ios - UITextView 最大高度

标签 ios uitextview

我在我的应用程序中使用 UITextView 并根据文本的大小设置它的框架。但是,如果 UITextView.size.height 大于 8192.0,文本就会消失。

UITextView 是否有最大高度?

编辑

到目前为止,我很感激所有的答案,但我已经能够毫无问题地设置框架。问题是,如果 frame.size.height 设置大于 8192.0,文本就会完全消失。

我不确定这个数字有什么特别之处,但是当我将框架设置为大于该数字的高度时,它会停止工作。

最佳答案

查看文档 https://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html

Note: In iOS 2.x, the maximum size of a UIView object is 1024 x 1024 points. In iOS 3.0 and later, views are no longer restricted to this maximum size but are still limited by the amount of memory they consume. It is in your best interests to keep view sizes as small as possible. Regardless of which version of iOS is running, you should consider tiling any content that is significantly larger than the dimensions the screen.

接缝是内存问题,不是具体高度

关于ios - UITextView 最大高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20364082/

相关文章:

html - 如何在 iOS 中的电子邮件的 HTML 正文中嵌入图像

php - 如何管理数据库中用户帐户的多个推送通知设备标识符?

ios - UICollectionView 委托(delegate)方法 "didSelectItemAtIndexPath"在 UITableviewCell 中使用 UICollection View 时未调用

ios - 如果启用了编辑模式,如何禁用 textview 的 uikeyboard

ios - UITextView contentInset 不工作

ios - 如何在 swift 中从 uitableview 转至 uitextview 并使用 nsattributedtext 属性

ios - Xcode iPhone SDK - 开始时保持 NSInteger 为零

IOS 应用程序崩溃 - 但不是在模拟器中 - 硬编码 URL 有效

iphone - 如何从 UITextView 中的图像上绘制由多行字符串组成的文本?

swift - 为什么我的 TextView 在滚动时是透明的以及如何禁用它?