简体   繁体   中英

UITabbarController layout issues in iOS 7 - view going behind the navigation bar

I'm working on mobile solution which needs to be upgraded to iOS 7. I've a tabbar controller with 4 tabs which is embedded in a Navigation Controller. All 4 view controllers of tab bar are having a tableview laid at (0,0) origin and set to size of view with resizing handles set properly. When I launch the application, the table view in the first tab bar item is displaying properly below the navigation item where as the table views in the remaining 3 tabbar items are going below the navigation item. The base controller is same for all view controllers in which I've set the following code.

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
    [self performSelector:@selector(setEdgesForExtendedLayout:) withObject:[NSNumber numberWithInt:UIRectEdgeNone]];
}

I've also deselected "Under Top Bars" & "Under Bottom Bars" under "Extend Edges" section in storyboard for the concerned view controllers. But still the issue remains same.

Any inputs on this would help me a lot.

Thanks

Sudheer

通过将setEdgesForExtentedLayout设置为UIRabEdgeNone到UITabbarController而不是将其设置为选项卡栏中的每个和各个视图控制器,已解决此问题。

尝试这个:

self.tabBarController.tabBar.translucent = NO;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM