iOS Developer

IOS 向Cell 中添加数据到最后一行

2016-12-07  本文已影响81人  JakieZhang

//1.向数组插入数据

[self.allCitiesaddObject:@"上海"];

//向最后一行插入数据,前提一定要先将数据插入到数组中

NSIndexPath*indexPath = [NSIndexPathindexPathForRow:self.allCities.count-1inSection:0];

[self.tableViewinsertRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationLeft]

上一篇 下一篇

猜你喜欢

热点阅读