04/25/26

programmatic ui with uikit

why i prefer building interfaces without storyboards.

when i first started developing for iOS, storyboards seemed like the logical choice. they were visual, easy to set up, and part of the default template. however, as my projects grew in complexity, i started feeling the limitations of this "drag-and-drop" approach.

switching to programmatic UI - building views and constraints entirely in code - was a turning point for my development workflow. here is why i prefer it:

1. code review and version control

storyboards are stored as complex XML files. merging a storyboard conflict is a nightmare. with programmatic UI, every change is just another line of swift code, making diffs readable and merges straightforward.

2. reusability and modularity

it is much easier to create reusable components when they are defined in code. you can initialize views with custom parameters, subclass them easily, and maintain a consistent design system across the entire app.

3. explicit control

building interfaces programmatically forces you to understand exactly how the view hierarchy and auto layout work. there is no "magic" happening behind the scenes in a hidden inspector panel.