UIWebBroswerView has gap from top of UIWebView [duplicate]
Asked Answered
R

1

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?

Rese answered 30/12, 2015 at 15:10 Comment(1)
set none to top bar as none is your storyboard/xib or direct hidden navigation bar using programming.Hoppe
T
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

Tower answered 30/12, 2015 at 18:59 Comment(2)
Please mark answer as accepted, if it solves your issue.Tower
Works great, thanks!Toplofty

© 2022 - 2024 — McMap. All rights reserved.