ios - 如何将完整数据加载到PFQueryTableViewController中并实现objectDidLoad?

标签 ios objective-c uitableview parse-platform pfquerytableviewcontrolle

我正在尝试从解析云中读取数据,并根据自定义单元格将其呈现在表格 View 中。到目前为止,我对呈现这些数据没有任何问题。但是我需要向这个 tableview 的单元格添加一些功能,例如

cell.backgroundColor = [UIColor greenColor];

要添加此功能,我需要知道表格何时完全加载。第一次加载 TableView 时,只有显示的单元格会在 cellForRowAtIndexPath 中传递。但我想知道这些单元格的确切更改时间。另一个功能是从源 VC 传递整数以在单元格中搜索并滚动到该特定单元格。像这样的东西:

    //Traverse into table
    for (UITableViewCell *cell in self.tableView.visibleCells) {

        NSIndexPath *cellIndexPath = [self.tableView indexPathForCell:cell];
    }

但是我需要在 cellForRowAtIndexPath 之外的某处执行此操作。我发现了这个:

(void)objectDidLoad:(NSError* error) {

    [super objectDidLoad:error];
    [self.queryInProgress cancel]; //query finished. self.queryInProgress = nil;

}

但是我得到这个错误:

enter image description here

PFQueryTableViewController 中没有选择器objectDidLoad!

这里是引用:objectDidLoad

它说:

你必须在你的实现中调用 [super objectsDidLoad:]。

这是什么意思?感谢是否有人可以帮助我解决这个问题?

最佳答案

你漏掉了一个字符“s”。 这是:

- (void)objectsDidLoad:(PFUI_NULLABLE NSError *)error

关于ios - 如何将完整数据加载到PFQueryTableViewController中并实现objectDidLoad?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32612181/

相关文章:

iphone - 设置中的圆角矩形按钮

objective-c - 在什么情况下,我们需要在 ARC 下编写 __autoreleasing 所有权限定符?

iphone - 在代码块中添加和删除 subview 不会产生动画

ios - 将结构与 NSMutableArray 一起使用

ios - 超出范围时,UISearchController 未正确关闭

ios - 如何在支持方向的情况下将 UITableView 部分页脚居中?

ios - NSMutableArray removeObject 崩溃

ios - UIApperance 和各种崩溃

ios - 出现“选择器的未知实例方法”错误,我不知道为什么

ios - 编辑 tableview Swift 的行高