我尝试使用下面的页面上的解决方案: UITextView highlightedTextColor or similar option?的UITextView setTextColor改变布局的UITableViewCell
不过,我发现,当我打电话setTextColor我的UITextView和颜色设置为彩色blackColor其他任何,UITextView中的内容会出现偏移,而我设置的颜色不会使用。
玩的时候,我可以在我的UITableViewCell修改以下初始化代码重复这个行为:
_notesTextView = [[UITextView alloc] initWithFrame:CGRectZero];
[_notesTextView setFont:[UIFont systemFontOfSize:12.0]];
[_notesTextView setTextColor:[UIColor redColor]];
[_notesTextView setUserInteractionEnabled:NO];
[self.contentView addSubview:_notesTextView];
上面的代码将导致TextView中显示来自我所期望的偏移,与当我离开默认颜色或设置为blackColor,文本也不显示为红色。
这太奇怪了 - 任何想法可能是错误的?
屏幕截图?没有太多可以继续。 – CodaFi