Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios -[id<;UIGestureRecognitzerDelegate>;GestureRecognitzer:应使用GestureRecognitzer同时识别]调试器中的两个识别器均为零_Ios_Objective C_Uigesturerecognizer - Fatal编程技术网

Ios -[id<;UIGestureRecognitzerDelegate>;GestureRecognitzer:应使用GestureRecognitzer同时识别]调试器中的两个识别器均为零

Ios -[id<;UIGestureRecognitzerDelegate>;GestureRecognitzer:应使用GestureRecognitzer同时识别]调试器中的两个识别器均为零,ios,objective-c,uigesturerecognizer,Ios,Objective C,Uigesturerecognizer,我有办法 -(BOOL)GestureRecognitor:(UIGestureRecognitor*)GestureRecognitor应与GestureRecognitor:(UIGestureRecognitor*)其他GestureRecognitor同时识别 { NSLog(@“%@\n%@”、手势识别器、其他手势识别器); 返回YES; } 日志记录正常: 2013-04-12 21:36:20.126 Project[2504:907] <UITapGestureRecog

我有办法

-(BOOL)GestureRecognitor:(UIGestureRecognitor*)GestureRecognitor应与GestureRecognitor:(UIGestureRecognitor*)其他GestureRecognitor同时识别
{
NSLog(@“%@\n%@”、手势识别器、其他手势识别器);
返回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>)>>
    }>

发生了什么事?我能解决这个问题吗?

你初始化识别器了吗

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

这是一个已知的XCode/lldb错误,尚未解决。如果您没有运行xcode 5-dp,您可以返回到gdb,它应该可以工作

Xcode 4.3发行说明:“使用LLDB调试器时,断点中的某些调试器命令和日志表达式会失败,因为Xcode在执行调试器命令或计算日志表达式时使用了错误的帧。如果您知道调试器命令或日志表达式必须相对于哪个线程运行,请添加一个断点操作,将当前帧设置为问题的断点操作之前的相应帧。10426977“


我的参考资料:

是的,当然。方法被调用了一千次。我说,
NSLog
正在打印它们,但它们不在调试器控制台中。你能展示一下初始化手势识别器的代码吗?这很奇怪。你是在方法中使用po吗?你的类没有ivar的同名。
UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panView:)];
[panRecognizer setMinimumNumberOfTouches:1];
[panRecognizer setMaximumNumberOfTouches:1];
panRecognizer.delegate = self;
[self.webView addGestureRecognizer:panRecognizer];