15

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?

Vijay Sharma
  • 2,252
  • 1
  • 17
  • 21

1 Answers1

48

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

technerd
  • 14,144
  • 10
  • 61
  • 92