2
我试图设置iOS 6 UITextView中某些初始文本的字体颜色。在UI 6模拟器中运行时,视图出现,但不显示属性。我错过了什么吗?在丰富的UITextView(iOS 6)中未显示文本属性
NSAttributedString *as = [[NSAttributedString alloc] initWithString:boilerText
attributes:[NSDictionary dictionaryWithObjectsAndKeys:
NSForegroundColorAttributeName, [UIColor redColor] ,
NSUnderlineStyleAttributeName,
[NSNumber numberWithInt: NSUnderlineStyleSingle],nil]
];
_descriptionView.attributedText = as;