当我单击"KALENDER"时,您会看到白色的闪光如何解决此问题?我的UIWebView看起来像这样: 让myWebView:UIWebView = UIWebView(frame:CGRectMake(0,0,UIScreen.mainScreen().bounds.width,UIScreen.mainScreen().bounds.height))myWebView.loadRequest(NSURLRequest(URL:NSURL(string:"http://website.com/test.html")!))self.view.addSubview(myWebView) 谢谢!解决方案所以,我所做的就是添加了: myWebView.opaque = falsemyWebView.backgroundColor = UIColor.clearColor() 在控制器上,我没有从查看"中选中它 I have a question. I have a menu, when I click on it, it will load content remotely from URL via UIWebView. When I try on simulator, before loading the content, there's a white background and then loads my HTML Page (which has dark background)Demo:You can see that white flash, when I click on "KALENDER"How can I fix this issue?My UIWebView looks like this: let myWebView:UIWebView = UIWebView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height)) myWebView.loadRequest(NSURLRequest(URL: NSURL(string: "http://website.com/test.html")!)) self.view.addSubview(myWebView)Thank you! 解决方案 So, what I did, is, added:myWebView.opaque = falsemyWebView.backgroundColor = UIColor.clearColor()and at controller, I unchecked this from "View" 这篇关于UIWebView-加载内容之前为白色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-24 11:30