views:

153

answers:

3

I am closely following the instructions given in the tutorial "Your First iPhone Application" on apple ADC.

In the interface builder, I have set up a button positioned on the top according to the Apple Interface Guidelines. It runs without trouble if I simulate the interface in IB. However, if I run the built app, I get what is shown here.

If you look at the view clearly, you will see that the entire view has been shifted up. And the magnitude of the shift is exactly the height of the status bar. And that's why the there is blank space at the bottom of the window, which was white instead of red.

I have tried turning on the "Simulated Interface Elements", but that doesn't work either. The problem persists on real devices as well. However, using the "Simulate Interface" from IB looks fine.

Any help is appreciated.

Yun Tao

A: 

Are you setting the frame of your view?

neha
A: 

I am having exactly same problem and it is making me crazy, i tried to resize frame, fit methods, inspector properties... Did you finally solve this problem? thanx

Ruthy
A: 

I already tried to resize it using view size inspector but width and height are locked, and x y can only be set its graphical position, so height is always set to 460! If I try to resize it like self.view.frame = CGRectMake(0, 0, 350, 500), it works but first time that view is called original non desired size appears and turns to new one like an animation, it doesn't appear instantly!! Thanks for your reply!!!

Ruthy