本文介绍了什么时候在iPhone项目中调用[UIWebView stopLoading]?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于iPhone项目中的UIWebView,对于[webView stopLoading]方法,它如何工作?真的停止所有与加载相关的过程吗?考虑此UIWebView加载清单的情况,如何处理?

For UIWebView in iphone project, for the method [webView stopLoading], how does it work? Does it really stop all loading related process? Consider the case this UIWebView is loading manifest, how does it deal with?

在[viewController viewWillDisappear]或[viewController dealloc]期间调用[webView stopLoading]的适当时间是什么?

What's the proper time to invoke [webView stopLoading], during [viewController viewWillDisappear] or [viewController dealloc]?

任何想法或讨论将不胜感激,在此先感谢您.

Any idea or discussion will be appreciated, thanks in advance.

推荐答案

在我的项目中,我正在这样做:

In my project I'm doing it like this:

- (void)viewWillDisappear
{
    if ([webView isLoading])
        [webView stopLoading];
}

- (void)dealloc
{
    [webView setDelegate:nil];
    [webView release];
    [super dealloc];
}

这篇关于什么时候在iPhone项目中调用[UIWebView stopLoading]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-10 23:57