activityIndicator in UIWebView with TabBar
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.
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>
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];
}
精彩评论