In the past few years, there hasn't been much updates around Storyboards and yet it seems like Xcode supports them.
Even before the first release of SwiftUI, many developers stopped using Storyboards for compelling reasons such as:
- They introduce two sources of truth for the UI
- It's not easy to read the content during code-review
- They can cause merge conflicts
- Often they fail to load, especially after a new major release of Xcode, without any error
I was wondering whether there's a dedicated team working on Storyboards or if they're just abandoned. I understand this question may overlap with what the Xcode team does; so, let me rephrase it: in a large project, what are the pros and cons of using Storyboards when building views using UIKit? For instance, do they work well with things such as navigation by employing segues, the liquid glass or the new resizing feature?
Finally, one of the benefits of using Storyboards is the fact that they visualize the UI, including the constraints. However, since now we can UIViewController in Preview, can we safely say that Previews can deliver the same thing?
Storyboards continue to work as they always have. They continue to support navigation and the Liquid Glass design, and they continue to support autoresizing masks and auto layout constraints, including per-size-class constraints, which are a best practice for the new resizing features.
There are many apps that use storyboards, and they will continue to be able to build and run. However, they don't support all of the latest features, such as building spatial apps on visionOS. If you're interested in building cross-platform apps that support visionOS, you may need to write your UI programmatically.
UIViewController in Xcode Previews is a great way to visualize the UI for your programmatic UI in real-time. Xcode Previews does not allow you to visually edit each individual subview like a storyboard does, but it does provide the benefit of visual feedback which can make the transition to a programatic UI easier.