I'm trying to ask the user to input their name in a SKScene but whenever I add a subview it messes up the SKScene and it starts to replay the music and doesnt add the new SKScene that I have the textfield in. Here is my attempt.
-(void)didMoveToView:(SKView *)view{
self.backgroundColor = [SKColor lightGrayColor]; // NOTE: temporary background color se
UILabel *nameField = [[UILabel alloc] initWithFrame:CGRectMake(200, 200, 300, 100)];
[self.view addSubview:nameField];
//[self createMenuTxt];
[self SetBrickBackground];
}
EDIT: I found a related post: Adding UITextView to a scene in SpriteKit
Which says that the reason is because the skScene is being presented everytime I add a UITextview. He said to use a guard: if(self.view.scene == nil){}, however, I'm getting that scene is not a property of UIView. Am I missing something?