I am trying to scale down a UITextView
with a custom font in a storyboard with constraints. I can easily animated the bounds and also the font-size. However, since it is a custom font the font-changing becomes quite choppy at larger sizes. I figured this could be done with by changing the transform
of the UITextView
. However, this does not seem to be working. The text view is self sizing in height, but uses a fixed with constant for width (which animated along with the font size/transform). This go gain control over where the text view line breaks.
I've tried all suggested solutions below without success. Either the view keeps it bounds but lowers in resolution. Or the bounds decrease, but faster than the appeared font size resulting in clipping.
Scaling UITextView using contentScaleFactor property
I've also tried to place the text view in a placeholderview where I also animated the height/width constraint multiplier to make sure it decreases in size.