Most likely what is happening is that you're adding a view sized appropriately for using a status bar to the window, whose size includes the status bar.
The iPhone's screen is 480px high, and the top 20px of that are allocated for the device's status bar (the one with the signal strength/WiFi indicator, clock, etc.). Normally, a view will be sized for the remaining 460px of the window, and if you're developing a view-based app, that's fine - that application template already provides a 320x460 root view that all your other subviews get added to.
But since you're adding to the window, which spans all 480px of the screen, my guess is that your view is just 20px too short. Try changing the height of the view, or setting its y-offset.