Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Long time iOS developers, are you using storyboards?
5 points by raydev on April 13, 2015 | hide | past | favorite | 8 comments
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?



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.


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.


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


and I use auto layout as much as possible

Did you mean as "little" as possible?


no


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.


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: