我有一个tableView完成填充视图。当我点击一个单元格tableView:didSelectRowAtIndexPath:正在被解雇,但是当我写touchesBegan:withEvent来查找tableView的touch和pinch事件时,它并未被解雇。 Tableview在视图上方是不触发的原因,如果是的话如何找到tableView或其某个单元格被触摸或捏住时。如何找到一个tableView单元格被触摸或捏在iPhone?
我找到了一种方法找到挤压或触摸的表视图细胞,首先声明UIPinchGestureRecognizer 对象的tableView:didSelectRowAtIndexPath方法: 即
UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
[tblAccountsList addGestureRecognizer:pinch];
[pinch release];
然后下面写的选择方法...
- (void)handlePinch:(UIGestureRecognizer *)recognizer {
NSLog(@"Pinch");
}
当我设置断点它正在执行,但该方法被调用了3次。 如果任何一个找到解决股吧,请...
在此先感谢...
对不起,我不知道hw做到这一点,帮助我... – 2012-01-10 12:18:01