How to make a transparent UIWebView

I recommend:

webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];

(setting these properties in Interface Builder will work for iOS 5.0+, but for iOS 4.3 you must set the backgroundColor in code)

And include this into your HTML code:

<body style="background-color: transparent;">

Leave a Comment