テキスト ビュー内のすべてのテキストがグレーで、最初の文が黒になるように探しています。その範囲を黒に設定するにはどうすればよいですか。私はすでに最初の文の文字列/範囲を持っています。ありがとうございました。
[tv setTextColor:[UIColor grayColor]];
id<UITextInputTokenizer> tokenizer = tv.tokenizer;
UITextRange *range = [tokenizer rangeEnclosingPosition:tv.beginningOfDocument
withGranularity:UITextGranularitySentence
inDirection:UITextStorageDirectionForward];
NSString *firstSentence = [tv textInRange:range];
NSLog(@"%@",firstSentence);