News for hackers. Stuff that matters.

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

I've been at this for a couple years, and I'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.

From the last blog post I read a year ago, Google's iOS developers are designing UIs in code. Given how Google's Inbox app looks, I totally believe it.

Is UI-in-code considered the standard for everyone else designing complex UIs?

( 8 comments | 5 points | on HN )
Re:Ask HN: Long time iOS developers, are you using storyboards? by speedyapoc on Monday April 13, 2015 @09:10PM (#9371512)
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.

Re:Ask HN: Long time iOS developers, are you using storyboards? by whiteisblack on Wednesday April 15, 2015 @06:27AM (#9379974)
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.
Re:Ask HN: Long time iOS developers, are you using storyboards? by wattson12 on Tuesday April 14, 2015 @05:22AM (#9373006)
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

Re:Ask HN: Long time iOS developers, are you using storyboards? by orbitur on Tuesday April 14, 2015 @12:35PM (#9375451)
and I use auto layout as much as possible

Did you mean as "little" as possible?

Re:Ask HN: Long time iOS developers, are you using storyboards? by wattson12 on Saturday April 25, 2015 @08:46AM (#9438163)
no
Re:Ask HN: Long time iOS developers, are you using storyboards? by tannk11001 on Tuesday April 14, 2015 @12:02AM (#9372034)
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.

Re:Ask HN: Long time iOS developers, are you using storyboards? by purans on Tuesday April 14, 2015 @01:46PM (#9375992)
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.
Re:Ask HN: Long time iOS developers, are you using storyboards? by b_t_s on Tuesday April 14, 2015 @01:37PM (#9375921)
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.