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?
Asked
Active
Viewed 161 times
1 Answers
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
-
This means there is no direct way to achieve this other than changing frames. – Arun_ Nov 17 '14 at 12:12