目前,我有一个UITableView
和 2 行。如图所示。它由 中的数组设置ViewDidLoad
。
ViewDidLoad
- (void)viewDidLoad {
[super viewDidLoad];
self.title = NSLocalizedString(@"Analysis", @"Badminton Analysis Tool");
NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"Statistical Analysis", @"Graphical Analysis", nil];
self.booksArray = array;
}
didSelectRowAtIndexPath
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
if (self.statViewController == nil) {
StatViewController *statDetail = [[StatViewController alloc] initWithNibName:@"StatViewController" bundle:nil];
self.statViewController = statDetail;
}
statViewController.title = [NSString stringWithFormat:@"%@", [booksArray objectAtIndex:row]];
[self.navigationController pushViewController:statViewController animated:YES];
}
目前,当我单击任一行时,它会推送到我只打算用于“统计分析”的同一视图。我想禁用点击图形分析。如何禁用“图形分析”的选择?
谢谢。