0

I used in MainWindow.xib and added one image view and set image (for background).

now in my webview page i wrote this code

webView.backgroundColor = [UIColor clearColor];
[webView setOpaque:YES];

and also [webView setOpaque:NO];

but i am not getting MainWindow.xib image background in webview? any one pls help me?

sreenivas
  • 399
  • 2
  • 5
  • 20

1 Answers1

0

You should try this (and I quote from the great Ortwin Gentz):

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

(for some reason it didn't work to set those properties via IB) and include this into your HTML code:

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

You see the original question here, please also upvote Ortwin's answer there: How to make a transparent UIWebView

Community
  • 1
  • 1
Johannes Fahrenkrug
  • 42,912
  • 19
  • 126
  • 165