2010-07-02 5 views
0

에서 나는 다음의 tableview 방법을 구현하고있다 :jQuery과 IndexPath.row는 범위

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

문제이며, 이것은 당한다 때, indexpath.row은 범위 밖으로까지 보이고있다. 셀을 삭제하고 tableview의 데이터 소스에서 값을 삭제할 수 있도록이 행에 대한 삭제 단추를 처리하려고합니다.

답변

0

xCode의 디버거가 눈에 띄지 않습니다. 이것은 무리가 발생합니다. 내가하는 일은이 같은 지역 변수를 만들고 내 브레이크 포인트를 설정하면 디버거가 더 잘 작동 할 것이다.

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 
NSIndexPath temp = indexPath; //Set Debugger after this and you can inspect the variable. 
} 
+0

같은 결과 ... –