gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 01:39:14 25 4
gpt4 key购买 nike

我正在尝试从解析云中读取数据,并根据自定义单元格将其呈现在表格 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/

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