07-18-2023, 11:33 PM
In my app I wish to make the WKWebView with transparent background, so the view behind (an ImageView) can show through as background picture.
webView!.opaque = false
webView!.backgroundColor = UIColor.clearColor()
The code above works fine with UIWebView, but if webView is WKWebView, a white background will be shown.
Also tried putting transparent background color in CSS. The result is the same, only works in UIWebView but not WKWebView. Any suggestion?
webView!.opaque = false
webView!.backgroundColor = UIColor.clearColor()
The code above works fine with UIWebView, but if webView is WKWebView, a white background will be shown.
Also tried putting transparent background color in CSS. The result is the same, only works in UIWebView but not WKWebView. Any suggestion?