swift2 - How do I delete a SKSpriteNode? -


i have figured out how create skspritenode when touch screen using touchesbegan method or touchesmoves method in xcode. what figure out how delete 1 node created when lift finger off screen.

touchesbegan , touchesended methods of skscene called asynchronously. must hold sprite object create in touchesbegan in variable belonging skscene can still access when touchesended called.

if have done that, removefromparent should work, why not set hidden , reuse same sprite next time user touches screen.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -