2
我有一个iOS Sprite Kit应用程序,它有几个节点在四处移动,您必须点击正确的节点才能获得点。我用过这种方法:如何检测Sprite套件中的触摸tvOS
- (void)touchesBegin:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
SKNode *targetNode = [self nodeAtPoint:[touch locationInNode:self]];
// Codes to check whether the user tapped the correct nodes goes here.
}
现在我想将我的应用程序移植到tvOS。一切正常,但触动。但是,你怎么能检测到它呢?