2013-01-15 7 views
0

슬라이드 이벤트에 대한 superView 응답을 원하지만 tableViewCell이이 이벤트를 먼저 catch하여 셀을 편집 모드로 전환하는 것처럼 보입니다. 누구나 해결책이 있습니까?tableViewCell이 슬라이드 이벤트를 수신하지 못하게하는 방법은 무엇입니까?

저는 UITableViewController를 childViewController로 사용합니다. parentViewController가 슬라이드 이벤트에 응답하기를 원합니다.

+0

당신의 self.view는 무엇입니까? – Dhara

+0

은 셀 사용자가 편집 할 수 있습니까? –

+0

수퍼 뷰 란 무엇입니까? – Ankit

답변

0

테이블 뷰 셀이 스 와이프에 전혀 응답하지 않고 뷰에 스 와이프 제스처를 추가하지 않으려면 다음을 수행하십시오.

UISwipeGestureRecognizer * guesture = [[UISwipeGestureRecognizer alloc]initWithTarget: action:@selector()]; 

다음보기에 추가하십시오.

[self.view addGestureRecogniser:guesture]; 
[guesture release]; 
0

재정의있는 tableView 내가 전에있는 UITableViewCell에 투명있는 UIButton을 추가 한하고있는 UITableViewCell 터치 이벤트를 수신하기 전에이 같은 와이프를 위해 작동 할 수 있도록이 터치 이벤트를 잡는다

-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    return ([tableView isEditing]) ? UITableViewCellEditingStyleDelete : UITableViewCellEditingStyleNone; 
} 
0

대리자 메서드 잘. 메서드를 호출하려면 버튼 하위 뷰에 UISwipeGesture를 추가하기 만하면됩니다.