Re:iOS Development Tips If You're Just starting Out
by robterrell on Wednesday January 16, 2013 @12:09AM
(#5065409)
Perhaps you're missing something. XIBs are arguably among the most powerful features of Cocoa. I built an app with a really complex, dynamic layout using them (look up "Panna" in the App Store). Working with an evolving design and changing team, with layout elements often changing and getting tweaked in tiny ways... Well, if I did the entire layout in code, I would have needed a full-time developer just for the ongoing GUI changes. I agree that dynamic layout support was weak pre-constraints, but it was still a much better development experience, and now you can do really complicated things without any code at all.
If you're just talking about some buttons in a toolbar, go nuts, but otherwise it's worth the time investment to learn.
Re:iOS Development Tips If You're Just starting Out
by andrewroycarter on Wednesday January 16, 2013 @12:27AM
(#5065475)
100% agree. IB makes for faster development time, easier maintenance, and it's way better for auto layout if you're targeting iOS 6.0
Re:iOS Development Tips If You're Just starting Out
by ravenger00 on Wednesday January 16, 2013 @12:34AM
(#5065498)
I think there's a case to be made though, that using IB when starting out doesn't make you fully understand how UIViews work. So starting out I'd probably recommend you make your own views programmatically to know what you're hooking into.
That said once you get that base level of understanding, nibs and storyboards are huge time savers, and are the way to go.
Re:iOS Development Tips If You're Just starting Out
by MaxGabriel on Wednesday January 16, 2013 @01:48AM
(#5065707)
While using storyboards definitely meant that I didn't understand things like how my root view controller got set up, I don't think it abstracts too much. Most importantly, using Interface Builder allowed me to explore the properties of views and get immediate feedback on how they're made. I still go back to a Storyboard when I need to figure out what combination of UIControl content settings I need.
Re:iOS Development Tips If You're Just starting Out
by jsankey on Wednesday January 16, 2013 @02:10AM
(#5065772)
My experience is all pre-autolayout, which is very new. It sounds like I definitely need to take another look for future work.
Re:iOS Development Tips If You're Just starting Out
by reidmain on Wednesday January 16, 2013 @09:22AM
(#5066862)
I'm 100% with you. I used nibs a lot when I started out but now I've slowly drifted away from them. The only thing I use them for is setting the frame so I can get a general idea of the layout of the view. Sometimes I'll set a few properties like text color and font size but I'll then move those lines into viewDidLoad: so I know exactly what my view will be like when it is loaded.
I've dealt with far too many bugs involving Interface Builder and it's random changes and "upgrading" the second I touch a nib that it's more of a liability now.
People who say it's less "code" are just delusional. Setting the font in IB versus a single line in viewDidLoad: doesn't save you anything. At some point in time that line of code is getting executed and you will at some point have to maintain it.
I also agree that the lack of "diffability" for XIBs, despite them being XML, is a pain.
Maybe I was missing something, but my experience matches the OP.