사용자가 UITableView에서 행을 삭제하려고 할 때 내 애플리케이션이 중단되고 디버거에서 SIGABRT 오류가 발생합니다.tableView에서 행을 삭제하려고 할 때 SIGABRT 오류로 앱이 다운 됨
- (void) tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
[[self displayedObjects] removeObjectAtIndex:[indexPath row]];
// Animate deletion
NSArray *indexPaths = [NSArray arrayWithObject:indexPath];
[[self tableView] deleteRowsAtIndexPaths:indexPaths
withRowAnimation:UITableViewRowAnimationFade];
//[[self tableView] deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
}
}
displayObjects에서 객체보다 먼저 행을 삭제 해보십시오. –
당신의 문제가 무엇인지 압니다. 나는 대답을 게시 할 것이다 – JTApps
Raphael Ayres 고맙다. 나는 당신의 생각을 시도했다. 그러나 그것은 효과가 없었다. – Ali