How to make a transparent UIWebView

Viewed 58037

I have an app with a UITableView and a corresponding detail view for each row. In the detail view I have to display some text and a background image (text is different for each row, but the image remains the same). The easiest way, in my opinion, is to put the text in an .rtf file and display it in a UIWebView. Then just put a UIImageView behind the UIWebView.

I've tried to set the UIWebView's opacity to zero in IB, but it didn't help.

Can you help me?

8 Answers

In Swift 4.x,

webView.backgroundColor = .clear
openSourceLicensesWebView.isOpaque = false
Related