0

I have a UIWebView to load certain pages.In iOS 8 it loads page with 20 pixel gap from top specially in portrait mode,in landscape mode it is fine.
How to handle the gap in portrait?enter image description here

Arun_
  • 1,806
  • 2
  • 20
  • 40

1 Answers1

0

Place following code in your viewWillAppear :

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
        CGRect viewBounds = [self.webView bounds];
        viewBounds.origin.y = 20;
        viewBounds.size.height = viewBounds.size.height - 20;
        self.webView.frame = viewBounds;
    }

Check this for more information : iOS 7 Status bar with Phonegap

Community
  • 1
  • 1
Divya Bhaloidiya
  • 5,018
  • 2
  • 25
  • 45