I have a UIWebView with a black content. All my views and subviews are set to black background.
When scr开发者_Python百科olling the webView to its top or bottom position, I can see a white background appear while the content is bouncing. So how may I force that background also to be black ?
Set webview color
to clearcolor
add then webview opaque
to no
.
webview.backgroundColor = [UIColor clearcolor];
webview.opaque=NO;
That will do the trick.
Are you sure all your subviews are set to black? Setting the webview's background color to black should work just fine. (It works in my app, if it doesn't work for you, I'll have to check if I do something else...)
webview.backgroundColor = [UIColor blackColor];
精彩评论