Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWebBroswerView has gap from top of UIWebView [duplicate]

I have a UIWebView which is taking up a whole view in my ViewController, which you can see here:

WebView

What I don't understand, is when I run my app, the contents of my UIWebView does not fill up the whole screen, you can see this here, where I first show the extent of the UIWebView (it is indeed taking up the whole screen):

WebView

And then here, where I show the extend of the UIWebBrowserView (which seems to have a gap from the top of the UIWebView).

WebView

Does anyone know why the UIWebBrowserView has a gap from the top of the UIWebView?

like image 410
Vijay Sharma Avatar asked Dec 30 '15 15:12

Vijay Sharma


1 Answers

I think this happens because of UIViewController's ScrollView Inset Property. Default value for adjustScrollViewInset is True.

Select ViewController and go to Attribute Inspector Tab. Uncheck Adjust Scroll View Insets option.

enter image description here

like image 70
technerd Avatar answered Nov 12 '22 00:11

technerd