I’m trying to use hAlignment and lineBreakMode on a CCLabelTTF but the compiler don’t like CCTextAlignmentCenter – CCLineBreakModeWordWrap and don’t like UITextAlignmentCenter – UILineBreakModeWrap too.
I don’t know how to solve this …
Here my code if you want an example :
CCLabelTTF *bubbleLabel1 = [CCLabelTTF labelWithString:@"My string."
dimensions:CGSizeMake(200, 120)
hAlignment:CCTextAlignmentCenter
lineBreakMode:CCLineBreakModeWordWrap
fontName:@"EngraversMT" fontSize:14];
Ok I just found how to solve this. You have to prefix your mode with a “k” (for constant).
Here the same example but now it works :