willSelectRowAtIndexPath Question....
- by treasure
How do you add a second section (SECOND_SECTION) here to be excluded from selection when editing?
(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSIndexPath *rowToSelect = indexPath;
NSInteger section = indexPath.section;
BOOL isEditing = self.editing;
// If editing, don't allow notes to be selected
// Not editing: Only allow notes to be selected
if ((isEditing && section == ONE_SECTION) || (!isEditing && section != ONE_SECTION)) {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
rowToSelect = nil;
}
return rowToSelect;
}
it s being driving me nuts...
thanks