나는 아마추어이고,이 오류에 갇혀 있습니다! 확실히 간단한 뭔가 ...어설 션 오류 - [UITableView _endCellAnimationsWithContext :
가- (void)addTapped:(id)sender {
TechToolboxDoc *newDoc = [[TechToolboxDoc alloc] initWithTitle:@"New Item" thumbImage:nil fullImage:nil];
[_itemArray addObject:newDoc];
//[self.tableView beginUpdates];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:_itemArray.count-1 inSection:0];
NSArray *indexPaths = [NSArray arrayWithObject:indexPath];
NSLog(@"%@",indexPath);
[self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:YES];
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionMiddle];
[self performSegueWithIdentifier:@"MySegue" sender:self];
//[self.tableView endUpdates];
이 이 라인에 위반되는
는 당신 주위 [UITableView beginUpdates]
및 [UITableView endUpdates]
를 추가 할 필요가
[self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:YES];
이제는 동일한 오류가 발생하지만 중단 점은 endupdates에 있습니다. – Jayrod7387
Jayrod7387과 같은 문제가 있습니다. – livingtech
필자가'numberOfRowsInSection'을 부정확하게 계산/반환했기 때문에 이런 일이 발생했습니다. – livingtech