UIStackView is a beautiful thing

Using UIStackView in auto layout to arrange four buttons is a breeze and the outcome is fewer lines of code.

Screen Shot 2017-09-23 at 10.38.56 PM
Nice refactoring using UIStackView

 

Screen Shot 2017-09-23 at 10.39.22 PM
Four button laid out using a UIStackView
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s