UIWebView background color

Set the background color in your html itself using css markup.

Or, set the webview's opaque property to NO .. and set the background of the view underneath to green.

UIWebView themselves don't seem to understand background color-- since they are rendering documents.


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

Use this an addition to your code

[myWebView setBackgroundColor:[UIColor greenColor]];
[myWebView setOpaque:NO];
[myWebView loadHTMLString:myString baseURL:nil];

Tags:

Ios

Uiwebview