您好我正在尝试根据内容设置 UITextView 高度。它可以很好地调整 UITextView 的框架。
但是如下图所示,缺少文本。这仅在 iOS7 中发生。它在iOS6中显示良好。如果我点击 textview 我开始编辑 textview 完整的文本正在显示。
我写了以下代码行 notesField.text = [editWellObject objectForKey:@"Notes"];
// Adjusting Frame as per text
CGSize size = [notesField sizeThatFits:CGSizeMake(notesField.frame.size.width, FLT_MAX)];
CGRect frame = notesField.frame;
float difference = size.height - frame.size.height;
frame.size.height = size.height;
notesField.frame = frame;
请在这个问题上帮助我。提前致谢。