I removed the status bar from my iPad app, but now there is a white bar at the bottom that is the same thickness as the status bar

StackOverflow https://stackoverflow.com/questions/22624827

  •  20-06-2023
  •  | 
  •  

Question

It seems like the program just moved the whole view up, and didn't stretch the webView to cover the bottom.

How can I make the webView take up the whole space, now that the status bar isn't taking up any? I tried just manually making the webView bigger in the storyboard but it has no effect.

Was it helpful?

Solution

I had the same problem in an iPhone app of mine. Try this:

- (void)viewDidLayoutSubviews
{
    self.webView.frame = self.view.bounds;
}

OTHER TIPS

  • Yup, What you are doing actually by removing status bar?

    By removing status bar you are freeing space for view with that much pixel as status bar occupied. So, now your view have approx '20px' more size,so it will show that white line which is actually your holder view on which "UIControls" are placed (not a line).

    *For that you can set size of your UIControl to view OR Use autoresize option *

  • self.yourwebview.frame = self.view.bounds;

    OR
    

    you can set property of webview

    enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top