Resolve UILabel Priority Conflict
suggest changeProblem: When you use many labels inside a view, you maybe get a warning:
![](/essential/ios/img/b8d2d9d19a0c3d20bb48b02e43e325a234fc1c45.png)
How can we fix this warning?
Solution: We calculate and set the priorities in order. The priorities must be different from labels. It means which is important will get higher priority. For example, in my case, I set the vertical priorities for my labels look like this:
I set the highest priority for 1st label and the lowest for 4th label.
![](/essential/ios/img/72f9a662096aef7f06ac2c14679a0d2fb957b7c9.png)
![](/essential/ios/img/f9c71ae67418572464a40f2975ac681670f42c04.png)
In a ViewController, I think you’re hard to see the effect of those priorities. However, it’s very clearly with UITableViewCell + estimate cell height.
Hope this help.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents