Why not to use Storyboards, xibs, and nibs

iOS offers a few ways to visually design your User Interface. You can use a xib (sometimes pronounced nib for historical reasons), a Storyboard:


… or code.

For large multi-person projects, code is the way to go. Here’s why.

Your UI, like every other part of your app, will change. You need to be able to make those changes quickly, easily, and reliably (bug-free, as much as possible). In a large project, you’ll have lots of developers working with the same code. That’s why you use source control, like git, svn, p2, or (hopefully not anymore) cvs.

The biggest problem with Storyboards is that you can’t easily merge them.

This is why all the major software developers – with well-established and streamlined development processes – don’t use xibs or Storyboards. Google Maps doesn’t use it. Facebook doesn’t use it.

The most sensible way to do feature implementation is with a separate branch for each feature, so merging is inevitable. Fortunately, most versioning systems like git make it relatively easy to merge. It’s an everyday operation. Most developers probably do it many times a day, and it’s no problem.

But not so with Storyboards.

More problems:

  • It’s a violation of good object-oriented programming style.
  • They add another layer of unnecessary complexity to an application.
  • They’re messy when working with large apps.
  • The negatives listed in the BNR iOS Programming Book.

The solution is simple: just code your UI normally :)

Leave a Reply