(Swift, iOS8, Xcode6, iPhone/iPad)
webViewDidFinishLoad
is not being called, is not firing, and is not working.
Yes, I have set the containing view controller as the delegate. I CTRL-mousedowned on the UIWebView, dragged up to the little yellow circle representing the view controller, and released. A right-click on the UIWebView object shows that the delegate is set.
Yes, I did implement UIWebViewDelegate
in my class declaration, like so:
class Paragraph: UIViewController, UIWebViewDelegate {
Yes, I did restart Xcode, and test on both the simulator and an actual iPhone 4S.
The request looks like this:
@IBOutlet var paragraph : UIWebView = nil
var r = NSBundle.mainBundle().pathForResource("cheddar", ofType: "htm")
var u = NSURL(fileURLWithPath: r)
paragraph.loadRequest(NSURLRequest(URL: u))
The callback function looks like this:
func webViewDidFinishLoad() {
println("webViewDidFinishLoad")
}