So, I\'ve begun working on a project in SpriteKit, and I\'m hoping to be able to implement a \"main menu\" scene with a few buttons. One would go to a level select screen, one w
I encountered this problem a few month ago when I started building my game with spriteKit.
And my answer is not really definite but here is my advice: For the in-game I would set up the UI programmatically - seems like a lot of work but for a video game it is actually not that bad. But some menu could be in a storyboard setup or xib file - like the main menu, and the different submenu outside the game.
For the touch add that function to your scene.m
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
CGPoint location = [[touches anyObject] locationInNode:self];
}
And then you can use CGRectContainsPoint();
Or you can add a UITapGestureRecognizer to you view controller.
UITapGestureRecognizer * recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
recognizer.delegate = self;
[view addGestureRecognizer:recognizer];
Setting up buttons in SKScene