View Full Version : Strange placement of views within window (views seem to ignore status bar)

Oct 20, 2009, 04:29 AM
Hi all,

Whenever I've tried to create a "window based application" in Interface Builder I seem to get a weird displacement of the views within the window. They all seem to be shifted up by about 20px (actually the exact size of the status bar).
It seems that the window is ignoring the status bar when positioning the view or the view itself is ignoring the status bar.
I've tried playing with the alignment and status bar settings in Interface Builder but to no avail so I'm really a bit stumped.

Any ideas would be welcome :)

Oct 20, 2009, 04:37 AM
I fixed the problem but I'm not entirely sure that this is the right way of going about it.

In the MainWindow.xib file I created a UIViewController outlet (and made it a "MyViewController" instead). Within that I selected Resize View from Nib and selected the Nib name. I then connected that to the app delegate and hey presto, the view no longer has strange placement.
I don't really understand why, however.

Any ideas?

Oct 20, 2009, 04:52 AM
I got a similar thing with transparent status bars, views got adjusted as if the bar wasn't there. Changed to another type and all is good.