UILabel Notes

  1. By default, UILabel doesn’t wrap around string. However large the size of the label is, it will always display a single line. To get around this, you have to set descriptionLabel.numberOfLines =0;  descriptionLabel.lineBreakMode = UILineBreakModeWordWrap;
  2. To automatically adjust the size of the label relative to the length of the string , follow this post here

 http://stackoverflow.com/questions/9181368/ios-dynamic-sizing-labels

This post is particularly good because it doesn’t need you set the points of the new frame. It uses the original starting points of the frame. It works particularly well with the approach we took because you can draw the label in storyboard and just dynamically set the size of the label.

Advertisements
This entry was posted in IPhone App Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s