webview 在多次刷新内容后,正文的下面有一块莫名其妙的黑色区域,如图一,本以为是由于我改了“UIWebDocumentView” 的原因,看到这个属性改了一下,发现居然好了。。。
opaque 默认是YES
改为 self.webView.opaque = NO;


看文档里面的注释,发现,我的英文真的不咋地,自己翻译吧。。。。
@property(nonatomic,getter=isOpaque) BOOL opaque;
// default is YES. opaque views must fill their entire bounds or the results are undefined.
//the active CGContext in drawRect: will not have been cleared and may have non-zeroed pixels

网友评论