2011-04-06 3 views

답변

12

핸들 이벤트 -

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath 
+0

+1. indexPath에서 셀을 가져 오려면 배열의 인덱스에 해당하는 테이블 행 (예 : 항목 목록 인 경우 'MyListItem' 클래스 또는 유사 항목)이있는 배열로 기본 데이터 구조를 저장할 수 있습니다. 그런 다음 인스턴스 변수/속성을 통해'UITableViewCell'을 자신의 MyListItem에 연결하거나, MyListItem을 선택했을 때 탐색해야하는지 여부를 나타내는 플래그를 MyListItem에 저장합니다. 셀을 읽을 수 있으면'if ([(MyListItem *) [myItemArray objectAtIndex : indexPath.row] cell] .accessoryType = UITableViewCellAccessoryDisclosureIndicator)'를 확인하십시오. – darvids0n

관련 문제