I am creating a game using the Sprite Kit, and I want to add a text box for players to enter their name.
How to create a text box using the Sprite Kit? I am going to create a player object (which I have already configured) and use the name that they enter and the default score is 0. Is it wrong practice or even possible to mix UITextfields and Sprite Kit nodes?
Something like that
UILabel *nameField = [[UILabel alloc] initWithFrame:CGRectMake(200, 200, 300, 100)]; [self.view addSubview:nameField];
But I suggest customizing my layout, just like for any other iOS application.
2 , , . , , , IB .
, , , UIViewController SKScene, , SKScenes, UIKit
SKNodes SKScene, :
[self addChild:node]
UIViewController UIKit, UITextView, - :
[self.view addSubview:textView]
, .
Smick, SpriteKit . , , . http://youtu.be/-B-iQ30dBbk http://youtu.be/4xh5Z8os2I0.