2011-03-27 5 views
0

테이블에 SQL DB의 데이터가 채워집니다. 편집을 클릭하면 행과 DB의 항목을 삭제할 수 있지만 완료를 클릭하면 아무 일도 일어나지 않습니다. UITableview 편집 : 완료 단추는 아무 것도하지 않습니다

내가 사용 삭제 구현하려면 commitEditingStyle :

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 

if (editingStyle == UITableViewCellEditingStyleDelete) { 

    //Get the object to delete from the array 
    buddies *buddyObj = [appDelegate.buddiesArray objectAtIndex:indexPath.row]; 
    [appDelegate removeBuddy:buddyObj]; 

    //Delete the object from the table. 
    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; 
    [self.tableView reloadData]; 
} 

}

나는이 응용 프로그램에서 다른 테이블을 편집/완료 작품 잘.

편집 작업이있는 테이블은 앱이 시작될 때 표시되는 첫 번째 테이블이며, 비 작업 테이블은 탭바의 두 번째 항목을 클릭한다고합니다.

도움을 주시면 감사하겠습니다.

덕분에, 최대

+0

게시 한 코드에 행 삭제 만 표시됩니다. 편집/완료 버튼 터치 이벤트를 처리하는 코드는 어디에 있습니까? – ssteinberg

+0

해결되었습니다. isEditing이라는 BOOL을 설정했는데이 충돌이 발생했습니다. 내 BOOL로 이름을 바꾸고 해결했습니다. – masgar

답변

0

확인은 해당 위임이 제대로 설정되어 있습니다.

관련 문제