Skip to content

Instantly share code, notes, and snippets.

@dmjio

dmjio/app.swift Secret

Created February 2, 2020 14:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmjio/d3bfd07eff3e5a37a7b8141aa87e4acb to your computer and use it in GitHub Desktop.
Save dmjio/d3bfd07eff3e5a37a7b8141aa87e4acb to your computer and use it in GitHub Desktop.
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