섹션의 행 수가 0이 아닙니다 (즉, indexPath.row == 0 임에도 불구하고 1을 반환합니다). arrayWithObject : ([self.tableView numberOfRowsInSection : 0] - 1)을 시도하십시오.
또한 [self.tableView numberOfRowsInSection :]은 배열에 NSIndexPath 객체가 실제로 필요한 경우 NSInteger를 반환합니다. self
가정하면 뷰 컨트롤러, 당신은 하나 개 이상의 섹션이있는 경우
NSInteger temprowcount = [self.tableView numberOfRowsInSection:0];
if (temprowcount > 0) {
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:temprowcount-1 inSection:0]] withRowAnimation:UITableViewRowAnimationNone];
}
-deleteRowsAtIndexPaths '의 두 번째 매개 변수 : withRowAnimation는 :의''BOOL' 아니다; 그것은'UITableViewRowAnimation' 유형입니다 – user102008