Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should new iOS developers use Storyboard and Xibs/Nibs?

I'm an experienced C/C++ Windows developer writing my first real iOS application. Since I don't really have to worry about backward compatibility, I decided to jump in and use the new Storyboard functionality in XCode 4.3. What I'm finding is that, while storyboarding holds out the promise of laying out all the screens in your application including segues and gestures without writing any code, the reality is that anything but the most trivial of programs don't work when you run them, usually failing unceremoniously with a very unhelpful error message. Worse yet, you can't step through the code to see what is wrong, because there is no code.

So my question is this: Should a new iOS developer develop without Interface Builder and Nibs and Storyboards at first as suggested by this article?

UPDATE 2020-04-03: It looks like SwiftUI bridges this chasm nicely and will probably be the way to build iOS apps going forward. In SwiftUI you do have code to step through, and it gives you real time feedback in Xcode showing how your app will look when it is run. As of this writing, there is a great free 100 day course (no affiliation) that I've been enjoying which includes an intro to Swift. Recommended.

like image 570
stephmur Avatar asked Jun 18 '12 17:06

stephmur


2 Answers

Yes! You should definitely use Storyboards to build your applications. One of the neat things about Interface Builder is that it doesn't abstract away the underlying concepts - you are still working with the same types of objects as you would in code (UIViewController, UIView, etc.).

This lets you still learn how UIKit works but experience the benefits of building your UI using a tool.

There is a WWDC presentation from last year that outlines the basics of using Storyboards in your apps:

https://developer.apple.com/videos/wwdc/2011/?id=309

like image 112
retainCount Avatar answered Oct 12 '22 20:10

retainCount


This is quite subjective but I definitively agree. If you want to learn how iOS works definitively start the UI code first. Interface builder is useful to position elements quickly and accurately, but like the article mentions you'll be much more productive after you understand how the views and controllers work together.

like image 45
Yavor Shahpasov Avatar answered Oct 12 '22 19:10

Yavor Shahpasov