One Quickie


Handling UITableView row deletion (UITableView->General)
- (void) tableView: (UITableView *) tableView
commitEditingStyle: (UITableViewCellEditingStyle) editingStyle
 forRowAtIndexPath: (NSIndexPath *) indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        [_cues removeObjectAtIndex: indexPath.row];  // manipulate your data structure.
        [tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject: indexPath]
                   withRowAnimation: UITableViewRowAnimationFade];
        [self updateUI];  // Do whatever other UI updating you need to do.
    }
} // commitEditingStyle



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

webmonster@borkware.com