I read some answers related to the same question, but I'd like to ask for something specific. When you have a HUGE project, imagine a big social network, even if you separate your UIViewControllers
logically into separate UIStoryBoards
, it still seems like it slows down the process. Every time you view any story board, it takes a while to render all of the UIViewControllers
and it seems like a huge pain to deal with.
Now, for large projects, would you go for Nib files or is it better to stick to UIStoryBoards
?
XIB and Storyboard are used for creating interfaces for users. One important point is,xibs are used for creating a single view(it has single file owner at the top of the xib file), but in-case for viewcontroller, multiple screens can be added and its flow can also be monitored(it has separate file owners).
What are XIB files? From the point of view of the UI designer, XIB files contain the views or windows that you design in Interface Builder – the controls, their layout and properties, and their connections to your code. It is important to understand that on a technical level, XIB files are stored object graphs.
SwiftUI is not replacing storyboards ; it may replace xib in some cases. But IMHO, SwiftUI is still far from providing the capabilities of xib. Just read in SwiftUI forum to see how developers are struggling to replicate what is easily done with xib and storyboards and autoLayout.
If it is a large project with many view controllers and there is a team collaborating on it, I would recommend XIB. This is because each small team will not have to understand the entire flow of the project so no need a storyboard with these relationships. And another big advantage is that when they merge there codes together, it will be less likely to have a merge issue. You don't want to have a merge conflict for a storyboard, trust me.
If only yourself are working on this, having a storyboard will indeed show the entire project flow and make you understand things more. So my recommendation in this situation is that keep using storyboard unless the storyboard loads in an unreasonable amount of time.
It is not to tell which one is the better. because which one is good to tell based on team requirement.
If you are a single developer, it is better to use storyboard because it consumes less time to load all views. but when If the team consists of many developers, use XIB, otherwise, it is not easy to merge the modules/tasks.
You can more read abouts pros and cons of using of both things here. http://codewithchris.com/xcode-using-storyboards-and-xibs-versus-creating-views-programmatically/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With