One Quickie


Prevent editing / deleting of table rows (UITableView->General)
To prevent a row from being deleted in a UITableView (say a header with sorting controls), override -canEditRowAtIndexPath:
- (BOOL) tableView: (UITableView *) tableView
    canEditRowAtIndexPath: (NSIndexPath *) indexPath {
    if (indexPath.row == 0) return NO;
    else return YES;
} // canEditRowAtIndexPath



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com