activityIndicator in UIWebView with TabBar
-
10-10-2019 - |
Question
I hope some one can help me with that.
I have a TabBar with some WebViews and an activityIndicator for each side. how can I hide this one when the side is Loaded?
I tryed it with
- (void)webViewDidStartLoad:(UIWebView *)webView1{
NSLog(@"Start test");
[activityIndicator startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView1{
NSLog(@"Stop test");
[activityIndicator stopAnimating];
[activityIndicator hidesWhenStopped];
}
but the function dosen't even get called.
I placed them in the ViewController where the webView is called.
Solution
Have you made your class the delegate for UIWebView?
[webview setDelegate:self];
You should also declare your class as a delegate:
@interface ClassName : NSObject <UIWebViewDelegate>
OTHER TIPS
Except UIWebView :
[pActivityIndicatorView startAnimating];
[self performSelector:@selector(fnWillCall) withObject:nil afterDelay:0.5];
[pActivityIndicatorView startanimating];
[pActivityIndicatorView stopanimating];
UIWebView :
- (void)webViewDidStartLoad:(UIWebView *)webView {
[pActivityIndicatorView startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[pActivityIndicatorView stopAnimating];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow