Software engineering notes

A case for programmatic views in iOS

leave a comment »

Context

If you’re new to ios, building ui in xcode, and frustrated with inability to search for help effectively.

Suggestion

Layout your ui programmatically. I’ve found PureLayout helpful for this.

Benefits

  1. Search based on concrete syntax (as opposed to search for the button that looks like … in xcode version …)
  2. Reference other people’s ui, eg PureLayout’s demos, without having to load it in xcode
  3. Comment on configuration (credit to Yong for noticing this)
  4. Code-review changes
  5. Reduce cognitive load because you only have to understand autolayout, not autolayout + interface builder

Caveat

Interface builder does a lot (I recently learned from Riz that LaunchKit used compiled storyboards for dynamic ui!), and is Apple’s recommended approach. I suspect I’ll have a better experience with it once I have more ui experience.

Written by Erik

July 29, 2017 at 1:10 pm

Posted in tool

Tagged with , ,

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: