Edward
Edward

Reputation: 7424

Resize a SKLabelNode font size to fit?

I'm creating a label inside of sprite kit and setting an initial size. Since the app is to be localized, words may appear longer in other languages than their english version. Therefore how can I adjust the font size of the label to fit within a certain width which in this case is the button.

myLabel = SKLabelNode(fontNamed: "Arial")
myLabel.text = "Drag this label"
myLabel.fontSize = 20

Upvotes: 10

Views: 4301

Answers (0)

Related Questions