tags:

views:

1152

answers:

1

I have a scroll-view with a UIImage on top the UIImage has its own view controller class and the scroll view is on the main root-controller. I added the hide status bar method to the root-controller but when I run the program the status bar disappears but leaves a white space and the view does not grow over the status bar white space. I tired other methods but I still get the same white space I also tried to enable scroll vertical and it looks like the status bar is on top of all my views, when I scroll up it keeps going up under the status bar.

What could be causing this?

+1  A: 

You just hid the status bar, seems like other components did not automatically expand to take over that space. Make sure you have "auto-resize subviews" enabled in all components under main root-controller.

If that doesn't help, you could try relocating and resizing your view in code. Something like:

CGRect frame = self.view.frame;
frame.origin.y -= statusBar.height;
frame.size.height += statusBar.height;
self.view.frame = frame;
JOM
Thanks Alot this was the fix for my problem the view was locked and also i had each view of a size of 320 X 460 i also changed the height to 480, for the ones that are going to copy and paste this example change statusBar.height to the value 20 this will adjust to cover the status bar.
Silent