Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 - adjusting for status bar

I am having trouble determining how to adjust for the status bar in iOS7. My view controller has a tableView, and I want the tableView to start under the status bar. Currently, it is being overlapped by the status bar. (The label at the top is a headerView in the tableView).

enter image description here

I have set the properties on my view controller via IB as follows:

automaticallyAdjustsScrollViewInsets = YES
edgesForExtendedLayout = UIRectEdgeNone

enter image description here

Is the expected behavior for these settings for the status bar to overlap the tableView? Or am I missing something? I have tried enabling auto-layout, and changing the project settings to only support iOS 7.

like image 555
user1032657 Avatar asked Oct 02 '22 21:10

user1032657


1 Answers

The solution is to check "Under Top Bars" and "Under Opaque Bars" in the Extend Edges section of IB.

like image 88
user1032657 Avatar answered Oct 07 '22 18:10

user1032657