だから私はボタンの引き出しを備えたスライド式のUITableViewCellを持っています。別のユーザーごとに、UITableViewCellのindexPathを取得するための非常に優れた実装に誘導されました。残念ながら、行を削除しようとするとエラーが発生します。ただし、オブジェクトは正常に削除されます。
-(void)checkButtonWasTapped:(id)sender event:(id)event {
NSSet *touches = [event allTouches];
UITouch *touch = [touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint: currentTouchPosition];
NSLog(@"%@", indexPath);
if (indexPath != nil)
{
PFObject *object = [self.listArray objectAtIndex:indexPath.row];
[object deleteInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
NSLog(@"%@", indexPath);
[self.tableView beginUpdates];
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
[self.tableView reloadData];
}];
}
}
ご協力いただきありがとうございます