- [id <UIGestureRecognizerDelegate> gestureRecognizer: shouldRecognizeSimultaneousWithGestureRecognizer] both resolvers are equal to zero in the debugger

I have a method

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { NSLog(@"%@\n%@", gestureRecognizer, otherGestureRecognizer); return YES; } 

Record in order:

 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>)>> }> 

But in the debug console they are nil s

 (lldb) po gestureRecognizer $1 = 0x00000000 <nil> (lldb) po otherGestureRecognizer $2 = 0x00000000 <nil> 

What's happening? Can i fix this?

+4
source share
2 answers

This is a known bug with Xcode / lldb that is not yet resolved. If you are not using xcode 5-dp, you can go back to gdb and it should work.

Xcode 4.3 release Notes: "Some debugger commands and log statements at breakpoints do not work when using the LLDB debugger because Xcode uses the wrong frame when executing a debugger command or evaluating a log expression. If you know in which thread the debugger command or log expression should work relatively, add a breakpoint action that sets the current frame to the appropriate value before the breakpoint action with the problem. 10426977 "

My link: The lldb debugger says my object is null if not?

+3
source

Have you initialized your resolvers?

 UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panView:)]; [panRecognizer setMinimumNumberOfTouches:1]; [panRecognizer setMaximumNumberOfTouches:1]; panRecognizer.delegate = self; [self.webView addGestureRecognizer:panRecognizer]; 
-1
source

All Articles