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?
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With