所以我有一个表格视图,每当用户按下一行时,就会出现另一个类视图。所以我想在过渡之间有一个加载指示器。我正在使用 MBProgressHUD,但是当我按下该行时它什么也没显示。我应该在@selector() 里面放什么?
[加载 showWhileExecuting:@selector() onTarget:self withObject:[NSNumber numberWithInt:i] animated:YES];
这是我的代码。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
loading = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:loading];
loading.delegate = self;
loading.labelText = @"Loading Events, Please Wait..";
[loading showWhileExecuting:@selector(//what should I put) onTarget:self withObject:nil animated:YES];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if ([[self.citiesArray objectAtIndex:indexPath.row] isEqual:@"NEW YORK"])
{
self.newYorkViewController = [[NewYorkViewController alloc] initWithNibName:@"NewYorkViewController" bundle:nil];
Twangoo_AppAppDelegate *delegate = (Twangoo_AppAppDelegate*)[[UIApplication sharedApplication] delegate];
[delegate.citiesNavController pushViewController:self.newYorkViewController animated:YES];
}
}