

Ask HN: Long time iOS developers, are you using storyboards? - orbitur

I&#x27;ve been at this for a couple years, and I&#x27;m finding that storyboards appear to be more restrictive than useful when creating dynamic and animated UI elements, considering you need to manage not only the views, but the associated constraints as well.<p>From the last blog post I read a year ago, Google&#x27;s iOS developers are designing UIs in code. Given how Google&#x27;s Inbox app looks, I totally believe it.<p>Is UI-in-code considered the standard for everyone else designing complex UIs?
======
speedyapoc
I've been an iOS developer for around 5 years and I do not use storyboards,
Interface Builder, or autolayout for any complex interfaces.

In the past, I've used these tools for laying out simple/medium complexity
applications on a very high level (like this scroll view goes here, then fill
it in using code), but in most cases it's just faster to create and layout the
view using code in the first place.

The CGRect geometry methods are very powerful and building views through code
is not nearly as daunting as many people make it out to be. I've found that
lazily creating the elements in their getters also helps keep my view
controllers sane versus creating all of the elements in viewDidLoad.

------
whiteisblack
I would really prefer using storyboards that debugging through each line of
codes. Not to mention the hierarchy of views that makes it hard to read
sometimes. Autolayout is fantastic but i'm not sure about the limitation when
it comes to complex UI(it's kind of vague for the term complex actually).
Apple introduces a new feature on autolayout this year where you can install/
uninstall constraints depending on size classses. This is really helpful if
you care about the app orientation.

------
wattson12
I've been an iOS developer for about 5 years, and I do all my UI in code (one
exception: the watch app we have is using storyboards). Storyboards are fine
but I find them slow once they get to a certain size, which for any non
trivial app, I always hit

I try to keep view controllers clean by having view subclasses which manage
layout, and I use auto layout as much as possible

Saying that though, its not the standard, and Apple push storyboards more and
more every year, so I would guess I'm in the minority

~~~
orbitur
_and I use auto layout as much as possible_

Did you mean as "little" as possible?

~~~
wattson12
no

------
tannk11001
I wouldn't use Storyboards for anything that isn't a largely cookie cutter app
with 5-10 ViewController's. They just get increasingly less maintainable as
your application becomes more complex.

Generally, I default to individual NIB's and create code-based views as
needed. Building and wiring views with Interface Builder is fast, easy and
documenting. When you want to implement a certain view in code instead,
there's no friction -- you just do it.

------
purans
I generally use storyboard for few initial view controllers. After that, I
either use separate nibs or code it. Storyboard can become messy and hard to
navigate around if you put lot of views in it. Even though, you can zoom in
and out, still it's messy. Also, it really depends on what you are trying to
do. There will be scenarios where using nib or storyboard won't just cut it.

------
b_t_s
every year or two I'll give nibs/storyboards another go for a toy project.
Usually a few days later I'm deleting them and re-doing the layout in code.
Plain old frames or something like AutoLayoutShorthand is easier and more
flexible.

