This one is driving me crazy early this morning. I want to load some local html into a web view:
class PrivacyController: UIViewController {
@IBOutlet w
Here is succinct version for Swift 4
1) Add import import WebKit
2) Add WebKit.framework in your project
@IBOutlet weak var webView: WKWebView!
if let filePath = Bundle.main.url(forResource: "FILE_NAME", withExtension: "html") {
let request = NSURLRequest(url: filePath)
webView.load(request as URLRequest)
}