gpt4 book ai didi

ios - (Xcode) 解析。如何在不使用 PFQueryTableViewController 的情况下删除表中的行

转载 作者:行者123 更新时间:2023-11-29 02:47:14 26 4
gpt4 key购买 nike

我在 Xcode 中工作,因为我使用的是 Parse,所以我想在不使用 PFQueryTableViewController 的情况下删除表中的一行,因为当我将 UIViewController 更改为PFQueryTableViewController,我的应用崩溃了。

这是我的代码:

PFObject *object = [self.datasource objectAtIndex:IndexPath.row];
// Remove the row from data model
[object deleteInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (succeeded){
[self refresh]; // this is my function to refresh the data
} else {
NSLog(@"DELETE ERROR");
}
}];

最佳答案

我建议您使用:PFQueryTableViewController 并找出您的应用崩溃的原因。另外,你的代码看起来很适合删除一行。

关于ios - (Xcode) 解析。如何在不使用 PFQueryTableViewController 的情况下删除表中的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24973188/

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