Dantuluri
Dantuluri

Reputation: 675

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

Upvotes: 11

Views: 7594

Answers (2)

Dantuluri
Dantuluri

Reputation: 675

The issue has been fixed by setting setEdgesForExtentedLayout to UIRectEdgeNone to UITabbarController rather than setting it to each and individual view controllers in the tab bar.

Upvotes: 15

Mutawe
Mutawe

Reputation: 6524

Try this:

self.tabBarController.tabBar.translucent = NO;

Upvotes: 7

Related Questions