title: How to create a sized WKWebView in Swift 3 / iOS 10
body: <p>I am attempting to add a WKWebView to my app that takes up about ~2/3 of the screen (leaving space at the bottom). Because there seems to be no way to add the <code>WKWebView</code> to the storyboard, I added a regular <code>UIView</code>. Then in my <code>viewDidAppear</code> method I try and create a <code>WKWebView</code> with the same bounds. Is this a sound approach?</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>    @IBOutlet var conversationView: UIView!
  
      override func viewDidAppear(_ animated: Bool) {
        let webView = WKWebView(frame: conversationView.frame)
        if let url = URL(string: "https://www.google.com") {
          webView.load(URLRequest(url: url))
        }
  
        // conversationView = webView // &lt;-- doesn't work :\
        conversationView.addSubview(webView) // works!
      }
  </code></pre>
  
  <p>Swaping the views outright doesn't work at all, so instead I add the web view as a subview of the temporary view I added to the storyboard. This at least lets me constrain it's position and size but still it feels very kludgy and like there must be a better way of doing this..</p>
  
  <p><a href="https://i.stack.imgur.com/OVnKA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OVnKA.png" alt="Screenshot"></a></p>