I am to load html file in my webview. The files contain references to /css
and /images
sub directories. So, I found the following from this answer.
let path: String? = NSBundle.mainBundle().pathForResource("Ace-VetBolus", ofType: "html", inDirectory: "HTMLFiles")
let requestURL = NSURL(string:path!);
let request = NSURLRequest(URL:requestURL!);
web1.loadRequest(request)
And I cannot resolve this issue: fatal error: unexpectedly found nil while unwrapping an Optional value
at the second line.