hiding network activity indicator

Posted by iSharreth on Stack Overflow See other posts from Stack Overflow or by iSharreth
Published on 2010-04-09T20:15:20Z Indexed on 2010/04/09 20:23 UTC
Read the original article Hit count: 266

- (void)viewWillAppear:(BOOL)animated {
   app = [UIApplication sharedApplication];
   app.networkActivityIndicatorVisible = YES; 
   NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
   NSURLRequest *request = [NSURLRequest requestWithURL:url];
   [webView loadRequest:request];
}

-(void)webViewDidFinishLoad {
   app.networkActivityIndicatorVisible = NO;
}

I want to hide the network activity indicator after webpage is loaded. I had written the above code. But the indicator is not hiding after the webpage is fully loaded.

Anyone please help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk