Created
November 8, 2015 05:30
-
-
Save ayanonagon/fcb30a1487fe61eb7bcd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
guard | |
let htmlPath = NSBundle.mainBundle().pathForResource("LICENSES", ofType: "html"), | |
let html = try? String(contentsOfFile: htmlPath, encoding: NSUTF8StringEncoding) | |
else { | |
fatalError("LICENSES.html not found.") | |
} | |
let webView = WKWebView(frame: CGRectZero, configuration: WKWebViewConfiguration()) | |
webView.loadHTMLString(html, baseURL: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment