In my storyboard, I have a View controller (embedded in a navigation controller). Inside the view controller I have a tab bar controller, and inside a tab a table view controller. My problem is that the last row of the table view goes "under" the tab bar of the tab bar controller. This didn't happen if i build my app for iOS 6.
How can I solve this? Thank you!
Try setting your tabbar translucent property.
self.navigationController.navigationBar.translucent= NO; // Set transparency to no and
self.tabBar.translucent= NO; //Set this property so that the tab bar will not be transparent
The accepted and upvoted answers don't work for my setup:
UITabBarController -> UINavigationController -> UIViewController -> UITableView
My app's root view controller is a UITabBarController
. Every tab is a UINavigationController
, and in one tab, the navigation controller's root is a UIViewController
with a table view as the main view.
So here's what worked for me: When alloc-initing the UITableView, I compute for the height and set it in the table view's frame. The general formula is screen height - (status bar height + nav bar height + tab bar height)
.
This, as said, will work perfectly. I've just tested it.
self.tabBar.translucent = NO;
I think it has to do with automaticallyAdjustsScrollViewInsets
not being applied (or applied correctly) due to the nested structure of your view controller hierarchy.
Try and copy your table into a new UIViewController
and make sure the checkmark in the UIViewController
's identity inspector called "Adjust Scroll View Insets" is turned on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With