我在我的应用程序中使用 UITextView
并根据文本的大小设置它的框架。但是,如果 UITextView.size.height
大于 8192.0,文本就会消失。
UITextView
是否有最大高度?
编辑
到目前为止,我很感激所有的答案,但我已经能够毫无问题地设置框架。问题是,如果 frame.size.height 设置大于 8192.0,文本就会完全消失。
我不确定这个数字有什么特别之处,但是当我将框架设置为大于该数字的高度时,它会停止工作。
最佳答案
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/