UITableViewCell移动、删除、添加
查看次数:2634
下载次数:547
上传时间:2016-12-15
大小:47 B
开发中常用的移动、删除、添加;
移动:
1:数据源
2:移除方法:
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath
toIndexPath:(NSIndexPath *)toIndexPath
{
id object = [_array objectAtIndex:fromIndexPath.row];
[_array removeObjectAtIndex:fromIndexPath.row];
[_array insertObject:object atIndex:toIndexPath.row];
}
收藏