UITextView 不显示长文本 [英] UITextView is not showing long text

查看:32
本文介绍了UITextView 不显示长文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UIScrollView 中有一个 UITextView.当文本不太长时,textView 会正确显示.

I have an UITextView inside a UIScrollView. The textView display correctly when text is not too long.

但是当文本很长很长时,它不会在textView中显示文本.但是,textView 仍然是可选的.

But when text is long long, it is not showing text in textView. However, the textView is still selectable.

这是我的布局.

非常感谢!

推荐答案

我在 UITextView 中显示很长的文本(33745 个字符)时遇到了同样的问题,在尝试了不同的副本长度后,限制是模拟器.如果字符数超过 7435,模拟器不会显示文本,但我可以滚动、复制等.

I had the same problem displaying very long text (33745 chars) in a UITextView and after experimenting with different copy lengths the limitation is with the simulator. If the number of chars was over 7435 the simulator did not show the text but I could scroll, copy etc.

但在多个设备上测试,33745 个字符的文本显示正确.

But testing on several devices, the 33745 chars text displayed correctly.

这篇关于UITextView 不显示长文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆