Objective-CのTips tableViewを動的に追加する

tableViewに動的に一行を追加する

おもった以上に迷いました。

/*
NSMutableArray * items;
@property (nonatomic, retain) NSMutableArray * items;
@synthesize items;
*/
    [self.tableView beginUpdates];
    [items addObject:@"ADD CEL"];
    NSIndexPath * path = [NSIndexPath indexPathForRow:0 inSection:0];
    [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:path] withRowAnimation:UITableViewRowAnimationTop];
    [self.tableView endUpdates];
    [self.tableView reloadData];

参考:
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html
http://ziddy.japan.zdnet.com/qa6788391.html