Category: Text


How to get UITextView to behave like UILabel

November 20, 2017

Reference, Text, UIKit

Comments Off on How to get UITextView to behave like UILabel


UILabel and UITextView both rely on TextKit to render text. So why do they behave differently and how can they work together?

Below is a view with a UILabel (blue) and two UITextViews (red) laid out in IB.

The Label is constrained to the top right corner of the view and uses it’s intrinsic content size to determine the width and height. The size of the label matches closely to the size of the text.

Read More »


Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.





Swift Tweets