ios - 代码 : Reload UITableViewCell

标签 ios objective-c uitableview

我有一个带有标签、指示器 View 等的 UITableViewCell 子类。我需要它在从 Web 检索数据时进行更新(具体来说,我有一个表示结果数量的标签)。

我用它来尝试重新加载单元格,但它不起作用。我知道正在调用 cellForRowAtIndexPath,并且更新了数据源本身的值。

[self.myFriendsTbl beginUpdates];
[self.myFriendsTbl reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[self.myFriendsTbl] endUpdates];

最佳答案

[self.myFriendsTbl reloadData];

关于ios - 代码 : Reload UITableViewCell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15024069/

相关文章:

ios - 如何在 UIAlertController 中设置 UITextField 的高度?

c++ - 在 xcode 10 上找不到 stdlibc++ header 错误

ios - 命名空间中不存在类型或命名空间名称 "MyBindingLib"(您是否缺少程序集引用?)

iphone - 离开页面后TableViewCells被删除

objective-c - 带有复选标记的 UITableViewCell 不可见

ios - 打开自定义 UITableViewCell 时在溢出菜单中显示/隐藏辅助功能元素

ios - AVAssetExportSession 不导出时间范围

ios - NSMutableDictionary - EXC BAD ACCESS - 同时读/写

ios - 在 cocoa mac OS X 应用程序中在 facebook 和 twitter 中共享文本?

iphone - NSNumber 存储零值而不是正确的数值