Reputation: 4699
I have an UITableViewController which is embedded in a TabbarController which in turn is embedded in a UINavigationController. Now, the scrollview of the tableview scrolls the first 2 rows under the navigation bar on the top. See screenshot:
How can I adjust that?
Upvotes: 0
Views: 676
Reputation: 2207
Try navigationBar.translucent = NO;
in your viewDidLoad
.
This happens due to the transparency feature that they introduced on iOS 7.
There's also another way: Unchecking the "Under Top Bars" in the storyboard will also fix the issue (select the view controller)
Upvotes: 0
Reputation: 4699
self.tableView.contentInset = UIEdgeInsetsMake(64.0,0.0,44.0,0.0);
This did the trick for me (in viewDidLoad)
Upvotes: 1