UIWebView 中带有 TabBar 的 ActivityIndicator
我希望有人能帮助我。
我有一个 TabBar,其中包含一些 WebView 和每一侧的 ActivityIndicator。 当侧面加载时如何隐藏这个?
我尝试过,
- (void)webViewDidStartLoad:(UIWebView *)webView1{
NSLog(@"Start test");
[activityIndicator startAnimating];
}
- (void)webViewDidFinishLoad:(UIWebView *)webView1{
NSLog(@"Stop test");
[activityIndicator stopAnimating];
[activityIndicator hidesWhenStopped];
}
但该函数甚至没有被调用。
我将它们放置在调用 webView 的 ViewController 中。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否已将您的班级设为 UIWebView 的委托?
您还应该将您的班级声明为委托:
Have you made your class the delegate for UIWebView?
You should also declare your class as a delegate:
UIWebView 除外:
UIWebView:
Except UIWebView :
UIWebView :