At the moment, I have a UITableView and with 2 rows. As shown in the picture. It is set up by an array in 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];
}
At the moment, when I click on either rows, it pushes onto the same view that I intend only for ‘Statistical Analysis’. I would like to disable clicking for Graphical Analysis. How can I disable selection for ‘Graphical Analysis’?
Thanks.
Return
nilfrom your table view delegate’s-tableView:willSelectRowAtIndexPathmethod.