Reputation: 1361
I'm trying to make a UILabel
with dynamic width with AutoLayout. Meaning on any screen size, is going to have a fixed height and a width that goes from 10 px from its superview left margin and 10 from the right. I also have another constraint 10 from the top. When I set those constraints and I update the frame however, this is what I get :
While this is how it's supposed to be :
If you could please let me know what do you think could be the issue here that would be really appreciated.
Thank you in advance.
Upvotes: 0
Views: 694
Reputation: 1935
I tested the following constraints will create left margin of 10 from left and 10 from right.
When you had made these constraints goto Editor -> Resolve Auto Layout Issues -> All Views in View -> Update Frames
Upvotes: 1