当用户双击我的单元格时,我正在呈现一个UIActionSheet:
在小区初始化中点击识别:
UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleDoubleTap:)];
[doubleTap setNumberOfTapsRequired:2];
[self addGestureRecognizer:doubleTap];
[doubleTap release];
告诉代表处理点击:
- (void)handleDoubleTap:(UITapGestureRecognizer *)recognizer {
NSLog(@"double oo");
[delegate handleDoubleTapp];
}
现在,作为我的UITableViewController的委托将呈现UIActionSheet:
-(void)handleDoubleTapp{
UIActionSheet *actionSheet = [[[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Reply", @"Retweet", @"Direct Message", nil] autorelease];
[actionSheet showInView:self.parentViewController.tabBarController.view];
}
}
我的UITableViewController正确实现了UIActionSheet委托方法。
问题:
答案 0 :(得分:0)
就像一个想法:一旦UIActionSheet即将变得可见,你是否尝试取消注册UIGestureRecognizer,并在行动表被取消时重新注册?也许识别器会干扰触摸。