It seems like it should be that simple, but I'm pretty new to Objective-C. What I want to do is just start and stop the counter while my WebView loads. This is an OS X application. All I was looking for is for Cocoa Touch, I only use Cocoa. In my AppDelegate.m I have methods that start and stop the counter (this works, I tested it).
-(IBAction)goSpin:(id)sender { [spinner startAnimation:self]; } -(IBAction)stopSpin:(id)sender { [spinner stopAnimation:self]; }
I also have two delegate methods for webView that I redefined.
-(void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame { [self goSpin:self]; } -(void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { [self stopSpin:self]; }
Basically, I would like to know how I can get a webView to set its delegate. Usually I have to do something in the .h file, but I cannot find links that list what the webKit delegate will do. Any help would be greatly appreciated.
source share