UIActivityIndicatorView 不会在 UIWebView 中显示
我有一个 UIWebView,我想在页面加载时显示活动指示器。我已添加 UIWebViewDelegate 并在 .xib 文件中添加了指示器,但它仍然不显示。
-(void) webViewDidStartLoad:(UIWebView *)webView {
[webView addSubview:loadingView];
[webView bringSubviewToFront:loadingView];
[loadingView startAnimating];
}
-(void) webViewDidFinishLoad:(UIWebView *)webView {
[loadingView stopAnimating];
}
谁能帮助我吗?谢谢。
I have a UIWebView that i would like to show an activity indicator in while the page is loading. I have added the UIWebViewDelegate and added the indicator in the .xib file but it still doesnt show.
-(void) webViewDidStartLoad:(UIWebView *)webView {
[webView addSubview:loadingView];
[webView bringSubviewToFront:loadingView];
[loadingView startAnimating];
}
-(void) webViewDidFinishLoad:(UIWebView *)webView {
[loadingView stopAnimating];
}
Can anyone help me? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的
loadingView
的IBOutlet
已连接到界面构建器中的视图对象。Make sure that your
IBOutlet
forloadingView
is connected to the view object in the interface builder.