Created
February 15, 2015 04:11
-
-
Save ryantbrown/fbebfefc04f54a381b44 to your computer and use it in GitHub Desktop.
Create a label in swift
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
// new label node | |
let lbl = SKLabelNode() | |
// set label props | |
lbl.text = "POLYGON"; | |
lbl.fontSize = 20; | |
// set label position | |
lbl.position = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMaxY(self.frame)-30); | |
// add to frame | |
self.addChild(lbl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment