美文网首页iOS Developer
IOS 向Cell 中添加数据到最后一行

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

作者: JakieZhang | 来源:发表于2016-12-07 09:50 被阅读81次

//1.向数组插入数据

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

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

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

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

相关文章

网友评论

    本文标题:IOS 向Cell 中添加数据到最后一行

    本文链接:https://www.haomeiwen.com/subject/kpjdmttx.html