gpt4 book ai didi

iphone - UITableView - 添加单元格

转载 作者:行者123 更新时间:2023-12-03 16:26:38 25 4
gpt4 key购买 nike

我在 TabBarController 中有一个 UITableViews,其中填充了单独的数据数组。由于网络同步,该数组会更新,我想更新该表。

调用:

[self.tableView reloadData]

将重新加载现有单元格中的内容,但我需要为新数据添加单元格。好像没有调用这个方法

-tableView:tableView numberOfRowsInSection:section

再次,这是我动态指定行数的地方。有任何想法吗?我已经阅读了我能找到的所有文档,但没有发现任何内容。这是应用程序设计问题吗?

谢谢!

最佳答案

看看 UITableView 中的这些函数:

-(void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
-(void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation

关于iphone - UITableView - 添加单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/818097/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com