5

I have an NSMutableAttributedString "timeString" whom's font and color I have already set. Everything is working fine, but I was wondering if there were a way to alter the text's height without changing the text's width (font width = 100%, font height = 120%).

I tried using transform, but it's not available for NSMutableAttributedStrings. Thanks!

KingPolygon
  • 4,753
  • 7
  • 43
  • 72

1 Answers1

1

There is no way to apply transforms to a string as a string is not actually a UI element. Your best bet in this case is to either add the Attributed String to a UILabel, transform the label's height and then draw the label in your context. Or transform whatever context you are drawing the text into.

Jason Grandelli
  • 342
  • 3
  • 10