我使用带有单个UITextView的xib来显示预先格式化的文本页面。用代码格式化文本太复杂了,所以我在Apple中进行格式化,然后在xib的UITextView对象中粘贴格式化的文本。我像这样在页面中加载这个xib
subviewArray = [[NSBundle mainBundle]
loadNibNamed:[language stringByAppendingString:_textXibName]
owner:self options:nil];
textView = [subviewArray objectAtIndex:0];
textView.delegate=self;
textView.editable=NO;
textView.frame = CGRectMake(_textOrigin.x , _textOrigin.y , textView.frame.size.width, textView.frame.size.height);
[self.vignetteView addSubview:textView];xcode.png
在IOS 6.1中,一切看起来都很完美。
6.1.png
但在5.1及以下的所有形式中,突然失去了!
5.1.png
从哪里开始挖?也许是因为我处于一种轻微的恐慌状态,我不知道!任何建议都是非常感谢的!
发布于 2013-08-31 19:32:02
UITextView和UITextField对使用属性字符串的样式文本的支持是在iOS 6中添加的。
请参阅:https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS6.html#
https://stackoverflow.com/questions/18548388
复制相似问题