Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView first rows are cut-off under top bar

I have a UITabBarController with two UITableViews, all were created in the storyboard.

The problem is that in the second tableview the first few lines of the table are under the top bar, this doesn't happens with the first tableview, even if I change the order of the views the first will work perfectly and the second will present the problem, so the one that was working perfectly now presents the same problem because is the second item of the tabbar controller.

I don't have much code to show because I didn't create the tableviews programatically.

like image 535
Boris Avatar asked Dec 04 '13 06:12

Boris


1 Answers

Not sure exactly based on your description, but a couple possibilities come to mind:

  1. Check your view controller attributes inspector in IB. Look for "Extend Edges" option under View Controller, and uncheck "Under Top Bars" if it is checked.

  2. In ios7, there appears to be a behavior in UIScrollView and all subclasses whereby the content inset and offset is automatically adjusted, sometimes not very well. You can try disabling that either in code or IB (see link for how: iOS 7 -- navigationController is setting the contentInset and ContentOffset of my UIScrollView)

like image 156
FeichengMaike Avatar answered Jan 03 '23 12:01

FeichengMaike