我试图在加载请求的URL之前显示并启动UIActivityIndicator到webView中...并在加载后停止它 但它永远不会显示....
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *dict = [self.arrNewsData objectAtIndex:indexPath.row];
NSString *newsLink = [dict objectForKey:@"link"];
// setup the controller to be pushed
UIViewController *webViewController = [[UIViewController alloc] init];
webViewController.title = @"Article";
// setu p the web view
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
webView.delegate = self;
[webViewController.view addSubview:webView];
// setup and start the indicator
_webViewLoadingIndicator = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(roundf((self.view.frame.size.width - 50) / 2), roundf((self.view.frame.size.height - 50) / 2),50,50)];
[webView addSubview:_webViewLoadingIndicator];
[_webViewLoadingIndicator startAnimating];
// send the request
NSMutableURLRequest * request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:newsLink]];
[webView loadRequest:request];
// push the controller
[self.navigationController pushViewController:webViewController animated:YES];
}