Boon
Boon

Reputation: 41480

How to create UIButtons anchored to the bottom of the view?

What's the best practice to create a few UIButtons in code that are anchored to the bottom of the view with a predefined spacing between each?

Upvotes: 1

Views: 221

Answers (1)

Noah Witherspoon
Noah Witherspoon

Reputation: 57149

Use the buttons' autoresizingMask property. If the parent view's only going to resize vertically, then that can just be set to UIViewAutoresizingFlexibleTopMargin.

Upvotes: 1

Related Questions