Tan Nguyen
Tan Nguyen

Reputation: 107

UITextView is not showing long text

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

enter image description here

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

enter image description here

Here is my layout.

enter image description here

Thank you so much!

Upvotes: 6

Views: 4095

Answers (2)

Dennish
Dennish

Reputation: 116

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.

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

Upvotes: 8

Fahim Parkar
Fahim Parkar

Reputation: 31627

Just say

yourTextView.scrollEnabled = YES;

and see the magic

Upvotes: 2

Related Questions