Created
November 19, 2014 01:20
-
-
Save ecto/7abc1655d1019f372299 to your computer and use it in GitHub Desktop.
Quick SKLabelNode-based button for Sprite Kit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SKLabelButton *button = [SKLabelButton initWithCallback:^{ | |
NSLog(@"touched"); | |
}]; | |
button.text = @"retry"; | |
button.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)); | |
[self addChild:button]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment