// Define your text
NSString *txt = @"Your text here, no need to add breaklines, but if you want to break in a particular point, use \n and it will go to next line...";
// Measure the height of the string given the width.
float fontSize = 14;
CGSize maxSize = { 300, 200 }; // Start off with an actual width and a height.
// Calculate the actual size of the text with the font, size and line break mode.
CGSize actualSize = [txt sizeWithFont:[UIFont fontWithName:@"Trebuchet MS" size:fontSize]
constrainedToSize:maxSize
lineBreakMode:UILineBreakModeWordWrap];
CGSize containerSize = { actualSize.width, actualSize.height };
CCLabel* label = [CCLabel labelWithString:txt
dimensions:containerSize
alignment:UITextAlignmentLeft
fontName:@"Trebuchet MS"
fontSize:fontSize];
label.anchorPoint = CGPointZero;
label.position = ccp(100,100);
[self addChild:label z:1000];