UIWebView background color

前端 未结 5 458
不知归路
不知归路 2021-01-31 01:19

I am loading an HTML string into a UIWebView in order to be able to view rich text. So far, so good. But I have one small problem: in my Nib file, I set the background attribute

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 02:22

    Tested in Xcode8 and Swift 3

    self.webView.isOpaque = false;
    self.webView.backgroundColor = UIColor.clear
    

提交回复
热议问题