iOS 9 Spritekit双击无法在iPhone 6S上运行 [英] iOS 9 Spritekit Double Tap Not Working on iPhone 6S
问题描述
我已经建立SpriteKit游戏已有一段时间了.它是一种纸牌游戏,允许针对特定行为双击纸牌精灵.现在我们进入iOS 9,双击在iPhone 6s上根本不起作用.在iOS8和所有设备上均可正常运行.
I have been building a SpriteKit game for a while now. Its a card game that allows double-tap on card sprites for specific behaviors. Now that we're in iOS 9, double taps do not work at all on iPhone 6s. Works fine on iOS8, all devices.
在我的SKScene
中,我正在使用touchesBegan
方法来检测水龙头:
In my SKScene
, i'm using the touchesBegan
method to detect taps:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint touchLocation = [touch locationInNode:self];
if(touch.tapCount==2) {
NSLog(@"double-tap, but not for iPhone 6s");
}
}
现在需要为SpriteKit游戏实现iOS9或6s(3d touch)专用的新功能吗?
Is there anything new with iOS9 or the 6s specifically (3d touch?) that needs to be implemented now for SpriteKit games?
我想指出,这在iPhone 6s模拟器中可以正常工作,但在实际设备上却不能.
I would like to note that this works fine in the iPhone 6s simulator, but it does not on the actual device.
此外,touch.tapCount
将报告3、4、5、6、7等轻击,但完全跳过第二次轻击.
Also, touch.tapCount
will report 3, 4, 5, 6, 7 etc. taps, but completely skips just the second tap.
推荐答案
So if this problem can be caused by touchMoved.
这篇关于iOS 9 Spritekit双击无法在iPhone 6S上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!