onm*_*133 8 edge tabbar navigationbar ios7
我有一个iOS 7应用程序,在TabbarController中有一个NavigationController.然后我自定义条形背景颜色
[[UINavigationBar appearance] setBarTintColor:[UIColor blueColor]];
[[UITabBar appearance] setBarTintColor:[UIColor blueColor]];
Run Code Online (Sandbox Code Playgroud)
它运行正常.但如果有一个ViewController想要不被酒吧覆盖的话,就像这样
self.edgesForExtendedLayout = UIRectEdgeTop;
Run Code Online (Sandbox Code Playgroud)
这意味着这个ViewController不希望被Tabbar覆盖.但它使Tabbar 比正常更暗
我想这是因为我为酒吧使用自定义颜色.怎么修 ?
小智 8
@rounak是对的,可能将标签或导航栏的半透明设置为NO告诉iOS不要尝试在当前的标签下放置另一个标签或导航栏,这会使其更暗.
在viewDidLoad中,添加以下内容:
self.navigationController.navigationBar.translucent = NO; // if you have a nav
self.tabBarController.tabBar.translucent = NO; // if you have a tab
Run Code Online (Sandbox Code Playgroud)