in my project when there are keyword words appear in sentence those keyword must be on difference color
currently im tired use something like this
string a: “hello test this is ****” and
strinb b: "__ keyword"
and make two strings to be the same position but in this way the will be appeared (cannot use ‘’ since it will make word-wrap work incorrectly )
yes,Is it Possible. But using CCLabelBMFont type label.In this type label you can access the separate character.
you can do that Using Simply CCLabelBMFont. Because you can simply Access the Each character using index value.
Example : -
//create Label like this
CCLabelBMFont *lblInfo = [CCLabelBMFont labelWithString:@“Multi Color Label” fntFile:@“SSPro.fnt”];
then, you can Access the character using Index path.
You can write a component class. For example: ESMultiColorLabel:
ESMultiLabel *label = ESMultiLabel::create("{{color=0xff6633}}plain text{{color=0x00ff00;text=green text}}plain text 2");