iOS7 Sprite Kit how to disable touches on a sprite to make it “tap through”?

后端 未结 2 1222
挽巷
挽巷 2021-01-12 04:38

I know that for traditional UIViews, I can set \"enable user interaction\" flag to NO, and the view will no longer respond to touches, letting the views below them receive t

2条回答
  •  时光取名叫无心
    2021-01-12 05:17

    Sprite Kit uses the zPosition value only to determine the hit testing and drawing order.

    So you could put all your sprites higher than 0 if you don't want to hit them. And then so a simple logic test is zPostion>0

提交回复
热议问题