Question: I have a question. I have a menu, when I click on it, it will load content remotely from URL via UIWebView. 

When I try on simulator, before loading the content, there's a white background and then loads my HTML Page (which has dark background)

**Demo:**

![https://s3.amazonaws.com/quickcast/6134/84576/quickcast.gif](https://i.stack.imgur.com/d0TjY.gif)

You can see that white flash, when I click on "KALENDER"

How can I fix this issue?

My UIWebView looks like this:

```
        let myWebView:UIWebView = UIWebView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height))
        myWebView.loadRequest(NSURLRequest(URL: NSURL(string: "http://website.com/test.html")!))
        self.view.addSubview(myWebView)

```

Thank you!

Answer: 
So, what I did, is, added:

```
myWebView.opaque = false
myWebView.backgroundColor = UIColor.clearColor()

```

and at controller, I unchecked this from "View"

![enter image description here](https://i.stack.imgur.com/wJ4iU.png)
You could load your own html document, which uses the color you need. 

```
override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)
    let htmlString = "<html><body bgcolor=\"#ABCDEF\"></body></html>"
    webView.loadHTMLString(htmlString, baseURL: nil)
}

```