A case for programmatic views in iOS


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


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


  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


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.