EDIT: Problem Solved!
For others, To fix it, simply right click the WebView, click the “delegate” circle, and drag it to “File’s Owner” on the left side.
Thanks for the help
–I’m fairly new to app developing, I’m in my first semester actually. Since it’s a brand new course, the instructor knows very little as well. Therefore I have complete permission to ask for help on this. Thanks!
On to my question…
I want to include an activity indicator in my app as my WebView starts and stops loading, simply enough. At this point, it will animate. However, my problem is that it starts before the WebView starts loading anything, and also doesn’t ever stop. My current code is this:
- (void)webViewDidStartLoad:(UIWebView *)webView {
[activity startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[activity stopAnimating];
Other than that, I have it set up in the header…
IBOutlet UIActivityIndicatorView *activity;
And as far as I can tell, set up rather properly. Oh, also, I do have “Animated” checked and “Hide When Stopped” checked in the .xib file.
UPDATE: NSLogs and breakpoints show that the methods aren’t being called.
I am a highly visual learner, so, I will need to see what I am missing, unless it is a problem in the interface. Thanks…
Any help is much appreciated
Do you have your webView correctly connected to the delegate? Toss in an NSLog or a couple breakpoints and make sure that your functions are being called.