TigerCoding
TigerCoding

Reputation: 8720

How do I determine the width of a CCLabelBMFont once I've created it?

After creating a label and adding to a layer, I need to find out how wide the text is on the screen.

[node textureRect].size.width

...is what I would normally use with sprites, so how would I find out with CCLabelBMFont?

Upvotes: 2

Views: 1700

Answers (1)

Lukman
Lukman

Reputation: 19119

You can use either label.texture.contentSize.width or label.contentSize.width.

Upvotes: 2

Related Questions