我有一个文本视图,其中文本显示如下:
how are you?
Fine
现在,如果我为文本视图设置字体,则两行(问题和答案)显示相同的字体,但是我希望问题以一种字体显示并以其他字体回答。我怎样才能做到这一点?
我这样设置字体:
textView = [[UITextView alloc]initWithFrame:CGRectMake(10, 80, 300, 440)];
textView.layer.borderColor = [UIColor blackColor].CGColor;
[textView setFont:[UIFont fontWithName:@"TimesNewRomanPS-ItalicMT" size:14]];
textView.layer.borderWidth = 1.0;
textView.autoresizesSubviews = YES;
textView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:textView];
提前致谢!!