iOS development-use storyboard to achieve Uilabel Adaptive Heights (IOS8)

Source: Internet
Author: User

Long time no blog, and later to write more blog, to oneself is a kind of promotion, to everyone is also a kind of help

Recently especially obsessed with the visual programming of storyboard and Xib, when writing a project encountered a problem is how to make Uilabel self-adaptive height, check a lot of article blog, there is no good way, I have to do their own manual, to achieve the effect of their own, the following share out

Believe that everyone has encountered this situation, label does not according to the text of the words from the height of adaptation

So how to make Uilabel adaptive height?

We need to do this under visual programming.

1, the height of the label can not be set to a fixed value, because set to a fixed value, the size of the label is determined, and how to change it will not be adaptive


2, the Label property is set to these values, specifically what meaning I do not understand, I will be in the next blog to tell you


The end result is this.

As you can see, we've achieved the results we want.

Here I do not use a line of code to achieve Uilabel adaptive height, and this is implemented under the conditions of iOS8, under the iOS7 will be a little different, using storyboard quickly, but no code will not understand the principle, so the use of code is the premise of using storyboard , so I will use the code to implement Uilabel's adaptive height sharing in the next blog.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

iOS development-use storyboard to achieve Uilabel Adaptive Heights (IOS8)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.