willSelectRowAtIndexPath Question....

Posted by treasure on Stack Overflow See other posts from Stack Overflow or by treasure
Published on 2011-01-09T14:46:19Z Indexed on 2011/01/09 14:53 UTC
Read the original article Hit count: 150

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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c