iOS 10 中 UIWebView 顶部的灰色条 [英] Grey bar on top of UIWebView in iOS 10

查看:25
本文介绍了iOS 10 中 UIWebView 顶部的灰色条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 Xcode 的对象库中拖动一个 UIWebView 时,我得到一个 UIWebView,顶部有这个深灰色条:

When I drag a UIWebView from the Object Library in Xcode, I get a UIWebView with this dark grey bar at the top:

那是什么,我怎样才能摆脱它?

What is that and how can I get rid of it?

推荐答案

你需要把 self.automaticallyAdjustsScrollViewInsets = NO; 放在 ViewDidLoad

You need put self.automaticallyAdjustsScrollViewInsets = NO; in ViewDidLoad

另一个选择是在视图控制器的 .xib 中禁用选项 调整滚动视图插入

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

这篇关于iOS 10 中 UIWebView 顶部的灰色条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆