I have one of the latest versions of Cocos2d where you can add a \n to your string and make it multiline. For example:
CCBitmapFontAtlas * title = [CCBitmapFontAtlas bitmapFontAtlasWithString:@"hello \n world" fntFile:@"font.fnt"];
would render:
hello
world
My problem is that if i try to use a dynamic text that won't work anymore:
CCBitmapFontAtlas * title = [CCBitmapFontAtlas bitmapFontAtlasWithString:text fntFile:@"font.fnt"];
where text is retrieved from a dictionary:
text = [di objectForKey:@"questionText"];
I get "Hello \n world"
i have also tried putting that text value like this, but doesn't make it work
CCBitmapFontAtlas * title = [CCBitmapFontAtlas bitmapFontAtlasWithString:[NSString stringWithFormat:@"%@ \n bla",text] fntFile:@"font.fnt"];
any ideas?