Black area on UIWebView during load Black area on UIWebView during load ios ios

Black area on UIWebView during load


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;


Set for UIWebView opaque NO and clear background color simultaneously:

enter image description here


You need to set the background color to clear as well as making the webView opaque. This doesn't seem to work if you don't also change the backgroundColor to clear.

self.opaque = NO;self.backgroundColor = [UIColor clearColor];