- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
如何用这个东西插入一个cell 以及这个东西怎么用

解决方案 »

  1.   

    indexPaths是一个数组,里面装的是NSIndexPath,就是指插入的位置,animation是BOOL值,是否要动画效果。
      

  2.   

    不知道你遇到了什么问题
    类似于这样就行了:NSMutableArray *arrayOfIndexPaths = [[NSMutableArray alloc] init];for(int i = 0 ; i < 4 ; i++)
    {
        NSIndexPath *path = [NSIndexPath indexPathForRow:i inSection:0];
        [arrayOfIndexPaths addObject:path];
    }[table insertRowsAtIndexPaths:arrayOfIndexPaths withRowAnimation:UITableViewRowAnimationTop];