First of all, I am a pure code party, like the thrill of percussion!!!
Let's talk about Storeboard.
1Storeboard
High efficiency;
Auto Layout, it is convenient to do the matching;
Multi-lingual is very convenient;
Static Tableview,collectionview is extremely convenient;
The most important is the intuitive, clear structure, at a glance!
(2) Disadvantages:
Not suitable for team development, for large displays, especially for ipad development!
Disadvantage Solution: Conflict problem: Storyboard is generally just used to show the layout of the page, the layout is not a change of things, if necessary
Modified, and the number of changes is very small. Generally in the team specifically agreed to several people responsible for modifying the layout of the page. If you really need a lot of people to change, please split the storyboard.
Performance problem: Is the bottleneck of performance really here? There are many times when you have to optimize your code, and the effect of using asynchronous blocks is more obvious.
Problems with large projects: subdivision storyboard in large projects can not only solve the problem of open lag, but also make the product line more intuitive.
Reuse problem: Storyboad does not reuse, reusable components can be encapsulated with nib and then introduced into Storyboad.
So when do we use storyboard, xib, and pure code?
(1) When to use storyboard? Organize multiple view hierarchies, the legendary segue. When using a template for some list or table cell. Use storyboard as much as possible with storyboard.
When do I not recommend the use of storyboard?
Dynamic or complex layouts, it may be necessary to use code to calculate the location of the associated view. If a view has been implemented with NIB or code
(2) When do I use nib? Modal boxes (such as login hints) reusable view components or templates when is the nib not recommended?
Views with dynamic Content
An attempt to design in an IB is inconvenient.
(3) When to use code? Pure Code Advantage is flexibility, take over the project is good change. Shortcomings, obviously slow. Dynamic layout
Try special effects
When is the code not recommended? When to use code is a good way, but not necessarily the best.
What are the benefits of Storeboard and pure code programming?