this code works fine , its show activityIndicator loading and hide after loading but lets say if its on loading stage and then i go back then my apps quit , so how to avoid this
if i go back quickly withiut site fully loaded then it quits ( i think activityIndicator is culprit)
**
- (void)webViewDidStartLoad:(UIWebView *)webView {
[activityIndicator startAnimating];
// myLabel.hidden = FALSE;
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[activityIndicator stopAnimating];
activityIndicator.hidesWhenStopped=TRUE;
//myLabel.hidden = TRUE;
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
self.title=@"KKH Website";
[super viewDidLoad];
NSURL *requestUrl = [NSURL URLWithString:@"http://www.开发者_开发百科/index.html"];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:requestUrl];
[aWw loadRequest:requestObj];
}
** updates
if i link uiwebview delegate to fileowner then its creating isuee , but i need delegate also since i want to show loading
i forgot to release my webview :( [aWw release]; now its fixed
精彩评论