加载期间UIWebView上的黑色区域 [英] Black area on UIWebView during load

查看:77
本文介绍了加载期间UIWebView上的黑色区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到当我在<$ c $中预先形成 loadRequest 时,我的 UITabBar 会变成深灰色c> UIWebView 。

I noticed that my UITabBar gets a dark-gray color when I preform loadRequest in my UIWebView.

如果我在 WebView > loadRequest 有一个黑色区域

If I scroll my WebView during loadRequest there is a black area

如何删除它?

推荐答案

我是之前遇到过这个问题,它与UIWebView的内容插入有关。只要在滚动视图上设置了底部插图,就会出现此黑色区域。我能够通过设置webview的 opaque 属性来解决这个问题:

I've had this problem before, and it's related to the content inset of your UIWebView. This black area appears wherever you have a bottom inset set on the scrollview. I was able to fix this by setting the opaque property of the webview:

self.opaque = NO;

这篇关于加载期间UIWebView上的黑色区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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