
#INTERFACE BUILDER TUTORIAL XCODE 8 CODE#
This might be different from one person to another, but we find it so much easier to create Auto Layout constraints in code rather than fiddling with the awkward Interface Builder UI for creating them. On the other hand, if the UI is created in code, it becomes so much easier to see how and when a view is created and customized. This quickly becomes frustrating and confusing. If you use Interface Builder and you have to modify a UI or fix a bug in it, you’ll have to keep jumping back and forth between code and Interface Builder due to the fact that all the customizations done to a view cannot be done in a single place.

Doing something as trivial as reusing a UITableViewCell prototype in two different view controllers is simply not possible. Using storyboards rather than standalone Nib files makes it even harder. Interface Builder makes it a lot harder to create reusable views. Reusability with Interface Builder and Storyboards It’s not impossible to do, but it’s not something you do with confidence like resolving a merge conflict in code.Īnother problem with Interface Builder files not being human-readable is that you cannot review changes done to them when doing code reviews, which means that unwanted or unintentional changes to UI may happen and slip by in code review. Interface Builder files aren’t human-readable, which makes merge conflicts very hard to resolve.

While both methods are a bit different and each one has some advantages over the other, this post discusses using either of them versus writing everything in code. When I refer to using Interface Builder, I mean using either one of the two methods it offers: storyboards or separate Nib files. I’m not trying to convince you why one approach is better than the other, but rather share why we prefer not to use Interface Builder at Instabug, even with Xcode 9 and all the enhancements to Interface Builder over the years. There are good arguments on both sides, and every team’s and project’s needs are different. Should you use Interface Builder and storyboards or write all your UI in code? This topic has been debated A LOT.
