tags:

views:

49

answers:

2

Hello

I have a strange problem when developing for the iphone

their is one window (in green) and one view (in orange)

alt text

when I try to test my app it looks like this in the iphone simulator

alt text

you can see the view have moved upwards

is this normal? and how to solve the problem?

many thanks

A: 

You're most likely adding the view incorrectly. You could post some code and I could give you a better idea, or if you just want a quick fix, open the orange view in Interface Builder, make it 480 px tall instead of 460, show the simulated status bar and relayout your image.

David Kanarek
Thanks, I dont have any code it is a very simple app I just added this line of code [window addsubview:view1];in the app delegate to load the viewI would prefer to not focus on temporarily solutions, Thanks
ahmed
A: 

In Interface Builder you can specify the simulated User interface elements. In the screenshots above you will notice in the green one you can see the status bar and the red one doesn't have it. You can turn on these elements by setting the properties of the view. Press Command-1 when you have the view selected and you will see a list of simulates ui elements you can add, these include the status bar, navigation controller bar and a few others i cant remember off the top of my head. This will allow you to position your ui elements correctly when you have these other elements on the screen.

The other issue with your view is that it is not the same height. have a look at the dimensions (cant remember exactly which one but its Command-2, 3 or 4 when you have the view selected) it should be 320x480, i reckon yours is 320x460... (20 pixels, the height of the status bar)

Aran Mulholland