views:

136

answers:

3

I'd like to add a custom UIToolbar to my UIViewController. In Interface Builder I add the uitoolbar at the top of my view, and it looks just fine. However, when I run the app in the Simulator it gets hidden by the default iphone bar (this one with the clock, battery status, etc.).

Here you can see how it looks like:

example

Any ideas?

+1  A: 

Seems like you're adding your view at coordinates (0,0), the top left of the screen. The view is then getting drawn behind the status bar. Make sure to add the view in the right position, to place it below the status bar it should be at (0,20)

pheelicks
Also, set 'Gray status bar' under simulated interface elements in IB.
Time Machine
Thanks @pheelicks!@Koning Baard XIV, could you be more specific?
Jakub
A: 

You can always just hide your status bar with the "Status bar is initially hidden" property in your Info.plist

+1  A: 

You shouldn't hide the status bar needlessly - so use the IB inspector on the window/view, and under "Simulated Interface Elements", set status bar to anything bar "None". This should be how a new view is created in IB.

Paul Lynch