我有一位可贵的书记长,当我试图去除一个囚室和删除新闻时,然后把囚室变成了老板,显示左边的红arrow。 但数据已经删除。 因为当我重新开会时,情况就已经过去了。 我的法典中是否有任何怀疑?
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
{
[self.tableView setEditing: !self.tableView.editing animated:YES];
if (self.tableView.editing)
[self.navigationItem.leftBarButtonItem setTitle:@"Done"];
else
[self.navigationItem.leftBarButtonItem setTitle:@"Edit"];
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
PFObject *routine= [self.routineArray objectAtIndex:indexPath.row];
[routine deleteInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (!error) {
[self.tableView reloadData];
} else {
// There was an error saving the gameScore.
}
}];
}
}