I want to make my webview to look transparent and show the data on it with background showing images of parent view.
Can anyone please let me know how to do this?
I want to make my webview to look transparent and show the data on it with background showing images of parent view.
Can anyone please let me know how to do this?
it may be help to u
[webView setOpaque:NO];
webView.backgroundColor = [UIColor clearColor];
Following code is use for solve your problem
NSString *htmlData=@"your data string here";
[self.webVctr loadHTMLString:strForhtmldata baseURL:nil];
now webview transparent for that following code to use.
self.webVctr.opaque = NO;
self.webVctr.backgroundColor = [UIColor clearColor];
UIWebView
is a subclass of UIView
, which means you can set its backgroundColor
property to a transparent UIColor
:
myWebview.backgroundColor = [UIColor clearColor];