Alex Rivera | Logout

How to set the top position = 0 after setStatusBarHidden:Yes?

Asked 2009-02-06T09:40:55.863
12

I found that after setting the

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]

at viewDidLoad, then if I want to align an image to the top, I will need to set its position as .y = -20;

Is there anyway to make the y coordinate of the top position to 0 ? or is it doomed to be -20 after hidding the status bar?

Thanks for reading.

Edit
Report

1 Answer

3

I imagine you should add a UIStatusBarHidden item to the Info.plist if you want the status bar to be removed from start.

Discussion@apple.com

You also could look into setting the Autosizing to resize vertical (and horizontal)

See under Add A Text View here for example of what to click on in InterfaceBuilder

Quote:

Click the horizontal and vertical lines in the internal box so that they become solid red lines. The animated preview shows that the text view's internal size will grow and shrink with the window.

answered 2009-02-06T09:47:27.440

Your Answer