2

I have a game with SpriteKit that have a main menu. The menu labels are triggered on touchesEnded. This works fine when starting the game for the first time.

Then, after the first level ends, the main menu is presented again. This time, touchesEnded is not triggered!!!

I tried showing another menu (the options menu) and the same thing happens. When I show it for the first time it works (I mean touchesEnded) but showing it for the second time make touchesEnded not called!!

Does anyone faced this?

Tony
  • 716
  • 9
  • 15
  • 1
    If possible, you should add the relevant code... See [how to ask a good question](http://stackoverflow.com/help/how-to-ask) – Whirlwind Feb 19 '16 at 23:41
  • Thanks for your comment but the code is not relevant here because I am asking about a concept. It is not a specific piece of code that is not working, but a OS event that is not triggered. The answer that I knew to my question shows that – Tony Feb 20 '16 at 06:34
  • Well how would someone know that you are using recognizers without seeing your code? – Whirlwind Feb 20 '16 at 10:27

1 Answers1

1

What was causing the problem is that inside my game level I have a UITapGestureRecognizer. I should do the following:

myTapRecognizer.cancelsTouchesInView = false

It looks like the taprecognizer cancels the touches globally not only in the scene that it belongs to.

Tony
  • 716
  • 9
  • 15