5

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.

user1032657
  • 2,451
  • 6
  • 28
  • 38
  • You can achieve iOS 6 like status bar in iOS 7 http://stackoverflow.com/questions/18294872/ios-7-status-bar-back-to-ios-6-style/19044681#19044681 – Desert Rose Sep 27 '13 at 07:17

1 Answers1

4

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

user1032657
  • 2,451
  • 6
  • 28
  • 38
  • What if I have a custom label? It doesn't seem to include those in the calculation. – tng Oct 01 '13 at 10:44
  • 10
    how to deal with a xib file? (not storyboard) – ZYiOS Nov 11 '13 at 17:02
  • 2
    I am using xcode 6 and storyboard. I checked "Under Top Bars" and "Under Opaque Bars", but my table view still overlaps with the status bar. I tried a couple of combinations of these 3 options, nothing works for me. – Unplug Oct 23 '14 at 03:19