Q:

Change color of text when music is playing

i'm newbie in Xcode programming :)
I want to create a karaoke software running in iPhone.  This software will display a lyric of midi or mp3 files.  But now I have a problem that I can't change color of each word in the sentence of lyric
I search in Web and they tell me using OpenGL ES or change color of each pixel of word to do that
Can anybody help me to solve this problem?  or suggest me how to do it? 

A:

Starting with iOS 6, you can use a UILabel or a UITextField or a UITextView to display an attributed string.   In an attributed string, you can assign different colors to different parts of the string.   For example:
NSString *text = @"Raindrops on roses and whiskers on kittens";
NSMutableAttributedString *trib = [[NSMutableAttributedString alloc]
    initWithString:text];
// trib's characters will all be drawn in black by default
[trib addAttribute:NSForegroundColorAttributeName value:[UIColor redColor]
    range:NSMakeRange(13, 5)];
// Now the five characters starting at offset 13 (“roses”) will be drawn in red. 

Apple had two sessions at WWDC 2012 about using attributed strings:

Session 222 - Introduction to Attributed Strings for iOS
Session 230 - Advanced Attributed Strings for iOS

I suggest you watch the videos.