I am trying to add one UITextField to SKScene subclass, I referred this url:
Here they are doing it in objective c.
I tried to do the similar thing in swift, by using below code:
let playerNameTextField = UITextField(frame: CGRectMake(50, 150, 50, 10))
playerNameTextField.center = CGPointMake(self.size.width / 2, self.size.height / 2)
playerNameTextField.backgroundColor = UIColor.whiteColor()
playerNameTextField.text = "some string"
playerNameTextField.borderStyle = UITextBorderStyle.RoundedRect
self.view?.addSubview(playerNameTextField)
but for some reasons it is not appearing over my game scene :(
Any clues?