What are the benefits of Storeboard and pure code programming?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.