Showing keyboard on SKScene and performing action on a sprite node based on key tapped

| | August 4, 2015

I am trying to learn SpriteKit and play with some simple sample apps.

Currently I am trying to achieve below things:

  1. Show keyboard over SKScene
  2. If user taps ‘A’, perform some action on a sprite node, if user taps ‘B’ perform some other action on other sprite nodes

I tried to google ‘Showing keyboard over SKScene’ but could not get any suitable answer :(

Any clues or suggestions?

One Response to “Showing keyboard on SKScene and performing action on a sprite node based on key tapped”

  1. I think your should implement UIKeyInput protocol for your relevant view, set the view’s canBecomeFirstResponder to true. When you need the keyboard, just call

    view.becomeFirstResponder
    

Leave a Reply