1

Im creating an app that uses a navigation controller for a couple of the views. When i finally figured out how to set it up this happened:

So obviously the black bar at the top is not supposed to be there, but i dont know what to do to get rid of it. Any ideas?

Barry Nailor
  • 407
  • 4
  • 11
  • I think i figured out what you meant. It has been done. – Barry Nailor Aug 26 '11 at 14:19
  • I have the same problem since today (simultanously updated to Xcode 4.5, iOS 6.0 and OS X 10.8.2). In my sourcecode I nowhere do read or set any .frame-property. I create all views programmatically; there is no xib- or nib-file in my project. The black bar is visible on a real iPhone and on the simulator too (also when simulating 4"-display). When I replace the view by another view (by tapping on the tab-bar) the black bar goes away and stays away, even when I go back to the 1st view. – Hubert Schölnast Sep 20 '12 at 13:33

2 Answers2

0

Looks like your view thinks it's supposed to have a status bar. Go into the XIB file and under the fourth tab in Simulated Metrics set Status Bar to None.

Luke
  • 7,110
  • 6
  • 45
  • 74
0

This is also commonly seen when setting up a view programmatically. Be sure to use:

myView.frame = self.view.bounds;

and not:

myView.frame = self.view.frame;
Reed Olsen
  • 9,099
  • 4
  • 37
  • 47
  • Thats weird, I always set up mine programatically and have never seen this problem before... – max_ Aug 26 '11 at 18:54
  • I have the same problem since today (simultanously updated to Xcode 4.5, iOS 6.0 and OS X 10.8.2). In my sourcecode I nowhere do read or set any .frame-property. I create all views programmatically; there is no xib- or nib-file in my project. The black bar is visible on a real iPhone and on the simulator too (also when simulating 4"-display). When I replace the view by another view (by tapping on the tab-bar) the black bar goes away and stays away, even when I go back to the 1st view. – Hubert Schölnast Sep 20 '12 at 15:37