Hiding the background and shadow of a UIWebView

In a project I am working on, we want to load in content on a UIWebView, but remove the background, and shadows[1] (created for bouncing the zoom).

How I resolved this was adding the following code, providing that your UIWebView is called webView, else just change the code accordingly:

[webView setBackgroundColor:[UIColor clearColor]];
[webView setOpaque:FALSE];
for(UIView *wview in [[[webView subviews] objectAtIndex:0] subviews]) {
   if([wview isKindOfClass:[UIImageView class]]) { wview.hidden = YES; }
}

I hope this helps someone!

Additionally,on your web page you can set the background colour like so: background: rgba(0,0,0,0.5) which allows you to use semi-transparent colours as backgrounds.