Skip to content

Instantly share code, notes, and snippets.

@soapyigu
Created March 3, 2018 07:59
Show Gist options
  • Save soapyigu/b4a41fe74e2b2fbbb7d8cb4b68302eba to your computer and use it in GitHub Desktop.
Save soapyigu/b4a41fe74e2b2fbbb7d8cb4b68302eba to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let webView = UIWebView(frame: view.bounds)
view.addSubview(webView)
if let filePath = Bundle.main.path(forResource: "hack", ofType: "html") {
webView.loadRequest(URLRequest(url: URL(fileURLWithPath: filePath)))
}
}
}
@lapendos94
Copy link

Hanifa.lapendos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment