views:

21

answers:

1

hi i am having a uiwebview and i want to make it transperent as i have image in background in the imageview , i tried webView.backgroundColor = [UIColor clearColor]; but it didnt worked

thanks

+2  A: 

It should work; make sure the webview is not opaque.

[myWebView setBackgroundColor:[UIColor clearColor]];
[myWebView setOpaque:NO];

You also have to check that your HTML content does not set a background color for the body tag.

body{background-color:transparent;}
Vivi
Almost taken ad verbatim from the TransWeb Apple sample code project introduction text. http://developer.apple.com/library/ios/#samplecode/TransWeb/Introduction/Intro.html
Shaggy Frog
ya thansk it worked
mrugen