user1398615
user1398615

Reputation: 299

UILabel text getting compressed/stretched upon applying scale transform

Am applying a scale transform to UIView (CGAffineTransformMakeScale) which contains UILabel as subview, as I apply transform, the label text gets stretched/compressed as shown in attachment, How can I make the UILabel to render the text correctly even after applying transform. enter image description here

Upvotes: 1

Views: 460

Answers (1)

Christian
Christian

Reputation: 382

Apply the transform on the UIView and then add the UILabel as subview. The way you are doing will always transform the UIView and all his subviews. You can also change the UIView frame instead of applying a transform.

Upvotes: 1

Related Questions