How do you find the height and width of a CCLabelTTF object?


I see in the api to create a CCLabelTTF object that you can either specify a height and width, or let the object auto-size… but I cannot find anything in the api that will tell you what the actual size of the label is if you let auto-size happen.

How can I determine the actual size of a CCLabelTTF if I’ve allowed Cocos to auto-size it for me?


CCLabelTTF *label = CCLabelTTF::labelWithString("Hello", "Arial", 14); CCSize labelSize = label->getContentSize();

try this.