我在 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/