Reputation: 97
I have the following wireframe:
I need to add the "Don't have an account yet? Sign Up.". To do this I'll have two different UILabels, one with "Don't have an account yet?" and another with "Sign Up" so I can style them separately.
My problem is that I don't know how to center to the Superview two different labels that have different size and my grow if it's localized to a language where they take more space than english...
So the questions would be: "How do I center two UILabels with different width related to it's superview?"
Thanks a lot!
Upvotes: 5
Views: 380
Reputation: 22374
Here is the steps:
Here is the visual presentation of it...
Upvotes: 6
Reputation: 10205
You should put them into container UIView make it flexible width (for ex. >= 10) and center it.
Upvotes: 6