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)