LuKenneth
LuKenneth

Reputation: 2237

UIWebView webViewDidStartLoad and finish is not called

I've seen this question appear on this site many times but none of the answers are helping me. The answers to the other questions are simply to set the delegate of the web view to self like so

WebView.delegate = self

however, when I do this, it gives me the error

"cannot assign a value of type 'MainScreen' to a value of type 'UIWebViewDelegate?'

Upvotes: 0

Views: 253

Answers (1)

LuKenneth
LuKenneth

Reputation: 2237

So I figured out the answer while I was typing, but I decided to post it anyway in case someone has the same issue I had.

the solution is you have to add "UIWebViewDelegate" to your view controller like this

class MainScreen : UIViewController, UIWebViewDelegate {

Upvotes: 2

Related Questions