If a "sprite" is created with "SKSpriteNode()", I guess we can overwrite "touchesBegan" function to receive it's touch event. However how can we do that when Spritekit scene editor is used?
How can "sprite" created in Spritekit scene editor receive touch event?
You can set a custom class on the node in the scene editor. Override touchesBegan in the implementation for the custom class. Alternatively, just assign a name to the sprite in the scene editor and then call nodesAtPoint in your scene's touchesBegan method. You can iterate over the nodes to check if any of them have the name you set.
Anyone know if this Custom Class functionality is only available in iOS 9? I have it working fine in a project that is using iOS 9 on the simulator, but when I test on my device (8.4) it doesn't load the custom class. I'd be really bummed to find out it wasn't supposed to work on iOS 8, because then I'll have to redesign my whole interface.
As far I'm aware the custom class functionality is an iOS9 + Xcode 7 feature.
I was afraid of that, but I was able to work around it with a re-design. It ended up being not that big of a deal for me, but still I was disappointed!