user2014474
user2014474

Reputation: 1117

UITextView stop writing outside bounds

I have a UItextView with disabled scrolling. Is it possible to stop the user from writing more content in the UItextView so that the writing will remain on screen and not disappear in the hidden side of the text view?

Upvotes: 0

Views: 85

Answers (1)

Wain
Wain

Reputation: 119041

You can implement textView:shouldChangeTextInRange:replacementText: to calculate the size of the text after the edit and decide whether to allow the edit to complete.

Upvotes: 1

Related Questions