Being new to ios programming,
I started of course with storyboard then I have read that it has its limitation when multiple developer comes to work on the same app, so I switched to pure code. But I guess xib / nib might be a good compromise.
Can you give me a more mature point of view?
Thanks a lot for your lights
I'd vote against using storyboards. They're just like the usual eyecandy stuff, that looks pretty with toy examples in WWDC presentations, but in real-life scenarios it rarely does the right thing... Storyboards force you to make unfortunate architectural decisions ( see: http://doing-it-wrong.mikeweller.com/2013/06/ios-app-architecture-and-tdd-1.html ), and as your project goes on, storyboards quickly evolve into a horrible mess of viewcontrollers and segues, not to mention the problems with merging storyboards... Been there, done that. With vim. It was painful...
In fact, I've been working on a project for 6 months, which started out using storyboards, and now development came to a point where I'd consider (if the deadline wouldn't be close) splitting the whole stuff into individual XIB's, if not pure code.
You should only use storyboards if:
- you're doing proof-of-concept apps / prototypes
- you're planning with no more than 6 viewcontrollers
- you'll be using simple stack-based navigation and nothing complex
I would still recommend using storyboards... you can have multiple storyboards per project if required and they can really reduce the amount of time it takes to create the UI. Also, if you are good with git, you can resolve conflicts pretty easily in most cases: http://blog.mugunthkumar.com/articles/avoiding-merge-conflicts-with-storyboards/
As for coding the UI, there are a few things that are best done in code... but to build the whole UI programmatically is like trying dig a hole with a spoon when you could be using shovel.
Using storyboard prevents two or more developers from working on different views at the same time, unless you use multiple storyboards.
Using .xib files, one per view controller enables one developer to work on say FirstViewController and its associated .xib, while another developer works on SecondViewController and its associated .xib. This way there is no overlap in what the different developers are doing, and one developer's changes will not wipe out the other's.
来源:https://stackoverflow.com/questions/18903752/best-pratice-between-storyboard-xib-nib-pure-programming