我知道通常的方式,它在视图控制器中工作,但不在场景中
UIPanGestureRecognizer *longPanGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panRecognized:)];
[self.view addGestureRecognizer:longPanGesture];
Run Code Online (Sandbox Code Playgroud)
然后我实现了选择器,但它永远不会被调用.然后我将相同的代码移动到我的场景的视图控制器中并调用了选择器.
我的问题是如何在精灵套件场景中添加手势识别器?