-
-
Save dmjio/d3bfd07eff3e5a37a7b8141aa87e4acb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { | |
super.viewDidLoad() | |
let myURL = URL(string:"https://www.your-website-url-goes-here.com") | |
let myRequest = URLRequest(url: myURL!) | |
webView.load(myRequest) | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment