Basically I want this How do I size a UITextView to its content? but backwards. That is, making the text inside the UITextView adjust to its frame, that is, making the font size big enough to fill its bounding box.
It shouldn't be that hard! UILabel has the method "adjustsFontSizeToFitWidth", I'm looking for something similar for the UITextView.
In a bigger picture, what I'm trying to do is:
Draw one glyph of a custom font I've created (not letters but other type of symbols: svg drawings) and being able to add to it a Gesture Recognizer (tapping or dragging it) and also being able to resize it. I want to start at a certain font size, then sizeToFit, and then being able to resize that frame and having the font automatically decide a font Size to fit the frame.
I tried using UILabels but they chop some of my custom glyphs (vertically) when I sizeToFit, whereas the UITextView doesn't.
Thanks for your help! :)