views:

48

answers:

1

I recently deployed my first iPhone app, a simple game, to my testing iPhone for the first time. Everything looks and runs fine on the simulator in Xcode, but on the iPhone the whole image is shifted up about 10 pixels or so. So the gameplay goes slightly offscreen on top and has a slim white/grey bar at the bottom. Has anyone encountered this before? I do have the status bar display turned off, I'm wondering if the device handles that flag differently than the simulator. I also have the rotation hardcoded to be in portraitRight mode at all times, and I have an extra line in the code to make the simulator do that automatically that's apparently not necessary on the device.

Everything is very simple, so I'm not sure where this glitch is coming from or even where to look.

+2  A: 

Did you use Interface Builder to create your UI? If you did, then go and check each and every XIB file(s) objects' Size & Position as well as Autosizing in Size Inspector (command-3).

It's very important to check both: your coordinates might have gone wrong after some change you did and autoscaling works in weird ways unless you attach to correct edges. Apple documentation should help http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html

JOM
Thanks, that got it! Though the Interface Builder wouldn't let me change the values; I had to go into the XML itself and change it.
fr0man