Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am making an app that has many tabs that will go to different links on my website depending on the tab Item. I looked up how to get a website on using the webView. I added the webview and made a small area to show for showing that it is not staying fit to the box. Attached is a link to a image of the Storyboard vs what is actually showing. I dont need it to be full screen as you can see at the button there is the tab bar like explained above.

Image of Storyboard vs Simulator

My View Controller Code:

import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
    var webView: WKWebView!
    override func loadView() {
        let webConfiguration = WKWebViewConfiguration()
        webView = WKWebView(frame: .zero, configuration: webConfiguration)
        webView.uiDelegate = self
        view = webView
    override func viewDidLoad() {
        let myURL = URL(string:"")
        let myRequest = URLRequest(url: myURL!)

What I have tried:

I have tried adjusting the constraints like others have said on various resources and nothing seems to be working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900