我有一个方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
NSLog(@"%@\n%@", gestureRecognizer, otherGestureRecognizer);
return YES;
}
记录正常:
2013-04-12 21:36:20.126 Project[2504:907] <UITapGestureRecognizer: 0x1e5c25b0; state = Ended; view = <UIView 0x1e5c5cc0>; target= <(action=toggleControls, target=<PictureViewController 0x1e5c0ab0>)>; must-fail-for = {
<UIScrollViewPanGestureRecognizer: 0x1e5c53a0; state = Failed; delaysTouchesEnded = NO; view = <ZoomScroll 0x1e5c4790>; target= <(action=handlePan:, target=<ZoomScroll 0x1e5c4790>)>>,
<UIScrollViewPinchGestureRecognizer: 0x1e5c5bb0; state = Failed; delaysTouchesEnded = NO; view = <ZoomScroll 0x1e5c4790>; target= <(action=handlePinch:, target=<ZoomScroll 0x1e5c4790>)>>
}>
<UIScrollViewPagingSwipeGestureRecognizer: 0x1f0bb4f0; state = Failed; view = <UIScrollView 0x1f0bb010>; target= <(action=_handleSwipe:, target=<UIScrollView 0x1f0bb010>)>; must-fail-for = {
<UIScrollViewPanGestureRecognizer: 0x1f0bb340; state = Failed; delaysTouchesEnded = NO; view = <UIScrollView 0x1f0bb010>; target= <(action=handlePan:, target=<UIScrollView 0x1f0bb010>)>>
}>
nil
但在调试控制台中,它们都是
(lldb) po gestureRecognizer
$1 = 0x00000000 <nil>
(lldb) po otherGestureRecognizer
$2 = 0x00000000 <nil>
发生了什么?我能以某种方式解决这个问题吗?