Search code examples
iphoneiosuitextviewcgaffinetransform

CGAffineTransformMakeScale on UITextView


I have an instance of UITextView. It is actually a box, and when user taps on it, I want to make it bigger. So I implemented CGAffineTransformMakeScale in tap event.

The problem is, the text inside the UITextView gets fuzzy and blurry. I set contentMode = UIViewContentModeRedraw, but didn't affect it.

Any idea? Many thanks in advance.


Solution

  • This is always going to happen. If you scale it like that using the transform it will always get blurry because the whole textview is scaled, including all contents.

    The only way to prevent this is not using the transform scale but simply make the textview frame bigger!