我具有其中文本被显示这样的文本视图:文本编辑
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];
在此先感谢!
它看起来像相同的要求。 http://stackoverflow.com/questions/2183275/how-to-give-background-color-for-selected-text-in-text-view – Madhu