tags:

views:

270

answers:

2

Shouldn't it be 460 when the status bar whose height is 20 is shown?

So it turns out that the status bar is ON the main window instead of ABOVE it?

In contrast, view height is set to 460 in IB when status bar is turned on.

+3  A: 

Depends how you're setting up the window. If you set its frame to [UIScreen mainScreen].bounds, you get the full 320x480; if you use .applicationFrame, you get 320x460 (or 320x440, if the status bar's double-height, as when the user's in a call, making a voice recording, or using tethering or Nike+).

Noah Witherspoon
I see no template code programmatically sets up the main window and no dev doc mentions it. Does Apple ever expect us to manually configure the main window, or insist we leave it alone? And if we are allowed to config the main window in code, why aren't we allowed to config it in IB?
an0
+1  A: 

The status bar is ON the mainWindow. Views that you create on mainWindow, can extend under the status bar or abut it.

mahboudz