Grey bar on top of UIWebView in iOS 10

社会主义新天地 提交于 2019-12-06 16:56:47

You need put self.automaticallyAdjustsScrollViewInsets = NO; in ViewDidLoad

The other choice is disable option Adjust Scroll View Insets in the .xib of your viewcontroller

That dark grey color is the background color set for the UIWebView. This will show if a webpage is smaller than the frame of the web view. You won't see it if you change the background color to white or transparent.

_webView.scrollView.contentInsetAdjustmentBehavior = .never

This should work if you have a WKWebView/UITableView/ScrollView. Add this in ViewDidLoad. This will make the status bar overlap the content without adding a extra white space in the status bar.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!