2

SKNode inherits from NSResponder but I'm having trouble understanding how nodes are included in the responder chain and where they are inserted.

For example, how does a SKNode receive the mouseDown: message?

When a view is clicked, a hit testing process occurs to determine the deepest view at the hit location and then mouseDown: is sent up the responder chain from that point.

SKNodes are not views so they cannot get send this message directly (because it it handled by the SKView). So how are they included in the responder chain?

Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
  • The answer you are looking for is here https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/CodeExplainedAdventure/ControllingtheCharacters/ControllingtheCharacters.html – sangony Mar 28 '15 at 23:16
  • Thanks. Hadn't seen that before. Still a bit confused how nodes get forwarded the responder messages. When the view gets hit does it just insert the hit node into to responder chain above itself? – Daniel Farrell Mar 29 '15 at 11:15
  • @sangony, something has changed in Apple docs, the link leads to "Page Not Found". – kelin Sep 01 '21 at 19:22

0 Answers0