나는 그렇게 같은 jQuery과 채우는하고 NSMutableDictionary와 .plist 파일을 가지고 사용자가 스 와이프 + 삭제를 할 수있게하고 또한 UiTableView 셀을 사용하여 새 항목을 plist에 "추가"합니다.추가/jQuery과
을 알리는- (void)tableView:(UITableView *)tableView commitEditingStyle: (UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
내가 시뮬레이터를 실행하고 나에게 오류를 제공 이렇게, "잘못된 갱신 : 섹션 0의 행 개수가 잘못이 내가이 일을 사용하고 코드입니다. 업데이트 (7) 이후에 기존 섹션에 포함 된 행 수는 업데이트 (7) 전에 해당 섹션에 포함 된 행 수와 같거나 그 섹션에서 삽입 또는 삭제 된 행 수를 더하거나 뺀 값이어야합니다 (삽입 된 0 , 1 삭제됨) 및 해당 섹션 안팎으로 이동 된 행 수 (0이 이동되고 0이 이동 됨)를 포함합니다. ' "
누구든지 나를 도와 줄 수 있습니까?
감사합니다. 나는 그것을 수행하는 방법을 알아 내려고 정말로 힘든 시간을 보내고 있습니다. 배열을 nsmutablearray로 바꾸 었는데 이제는 올바르지 않다고 말하는 오류가 발생했습니다. 합계에 대해서도 여전히 동일한 오류가 발생합니다. 어떤 팁? – TerryG