tags:

views:

34

answers:

2

It is possible to change a NSString color by letter?

For example, if you have NSString *A=@"ASDFGH";

show in UILabel ASD with red and FGH with blue.

And another question.. If I have a NSString, can I access the letter I want? For example, in NSString *A=@"ASDFGH"; how can I know what is the second letter which is S, or the third, which is D?

+1  A: 

Check this question out.

Pablo Santa Cruz
A: 

for your second question you can use these three methods of NSString

 – substringFromIndex:
 – substringWithRange:
 – substringToIndex:
mihirpmehta