我已经实现了UIPencilInteractionDelegate
来检测苹果铅笔双击,如下所示。
UIPencilInteraction *pencilInteraction = [[UIPencilInteraction alloc] init];
pencilInteraction.delegate = self;
[self.view addInteraction:pencilInteraction];
委托方法的实现
- (void)pencilInteractionDidTap:(UIPencilInteraction *)interaction{
NSLog(@"Detected");
}
但是,使用上述实现无法检测到双击手势。怎么了?