开发者

iPhone - changing UIWebView background color behind the view (bouncing background)

开发者 https://www.devze.com 2023-04-13 05:07 出处:网络
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

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号