Ios SpriteKit奇怪的触摸协调行为

Ios SpriteKit奇怪的触摸协调行为,ios,sprite-kit,Ios,Sprite Kit,SpriteKit中的触摸坐标在Y轴上似乎有奇怪的负偏移 这是我在场景中获得触摸位置的方式: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInNode:self]; NSLog(@"Touch location: %@", NSStringF

SpriteKit中的触摸坐标在Y轴上似乎有奇怪的负偏移

这是我在场景中获得触摸位置的方式:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint location = [touch locationInNode:self];
    NSLog(@"Touch location: %@", NSStringFromCGPoint(location));
}
如果触摸屏幕的最底部,可以得到的最低Y坐标值约为8.5点,在屏幕顶部有一个明显的区域,可以产生相同的最大Y坐标值

有人遇到过同样的问题吗?这是SpriteKit中的一个bug还是我做错了什么

我在GitHub上上传了一个演示项目来说明这个问题:


注意:您只能在真实设备上重现此行为。在iOS模拟器上,一切似乎都正常工作。

检查场景的scaleMode并尝试不同的方法ones@LearnCocos2D,我已经玩过该属性了,没有结果。这是“不可见”状态栏还是手势识别器识别区域正在进行破坏?