When to use Storyboard and when to use XIBs

ios, uistoryboard, xcode, xcode-storyboard

Solution

I have used XIBs extensively and completed two projects using Storyboards. My learnings are:

- Storyboards are nice for apps with a small to medium number of screens and relatively straightforward navigation between views.

- If you have lots of views and lots of cross-navigation between them the Storyboard view gets confusing and too much work to keep clean.

- For a large project with multiple developers I would not use Storyboards because you have a single file for your UI and cannot easily work in parallel.

- It might be worth for large apps to split up into multiple storyboard files but I have not tried that. This answer shows how to do segues between storyboards.

- You still need XIBs: In both of my Storyboard projects I had to use XIBs for custom table cells.

I think Storyboards are a step in the right direction for UI implementation and hope Apple will extend them in future iOS versions. They need to resolve the "single file" issue though, otherwise they won't be attractive for larger projects.

If I start a small size app and can afford iOS5 only compatibility, I would use Storyboards. For all other cases I stick to XIBs.

Problem

Are there any guidelines on when to use storyboards in an iOS project and when to use XIBs? what are the pros and cons of each and what situations do they each suit? Near as I can tell it's not that clean to use storyboard segues when you have view controllers being pushed by dynamic UI elements (Like map pins).

Original source

Related problems