0

I am trying to make the background of my UIWebView transparent. I tried the things mentioned here: How to make a transparent UIWebView

well it works but only after I press a button on my webview, and is not transparent when it loads. I can't figure out why.

Community
  • 1
  • 1
nikozavar
  • 21
  • 4

1 Answers1

2

Well the problem was that I had put these messages in the function for the button.

  [self.webView setOpaque:NO];
  [self.webView setBackgroundColor:[UIColor clearColor]];

I put the in the viewDidLoad method and it worked.

nikozavar
  • 21
  • 4