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。一切正常,但觸動。但是,你怎麼能檢測到它呢?