Created
October 2, 2013 04:52
-
-
Save baphillips/6789270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer willSpeakRangeOfSpeechString:(NSRange)characterRange utterance:(AVSpeechUtterance *)utterance | |
{ | |
// Highlight the portion of text that will be spoken. | |
NSMutableAttributedString *aString = [[NSMutableAttributedString alloc] initWithString:_textLabel.text]; | |
[aString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:characterRange]; | |
_textLabel.attributedText = aString; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment