Baby mouse Baby mouse - 4 months ago 16
iOS Question

Xcode 7.3.1. My activity indicator keeps on spinning

I already checked the behavior on activity indicator view setting and coded it on a view controller..But still it keeps on spinning...What would be the problem?

I added this

@IBOutlet var Loadebest: UIActivityIndicatorView!


and this

func webViewDidStartLoad(_ : UIWebView) {
Loadebest.startAnimating()
NSLog("Webview is working")
}
func webViewDidFinishLoad(_ : UIWebView) {
Loadebest.stopAnimating()
NSLog("Webview stopped working")
}


But nothing happens...what could be the problem?

Answer

Check in storyboard, you have given delegate to webview. If you haven't given delegate to webview then webViewDidFinishLoad will not call and it will not hide spinner.

Comments