Getting Started with iOS development: About Performance Tuning – choose nib or Storyboard discussion

Source: Internet
Author: User

The story board is the Apple after IOS5 technology, the intention is to integrate multiple nib files in a story board file, easy to manage, story board can also respond to the navigation between the controller, a lot of navigation is a need to line on it, do not need to write code, easy to use. But I cautioned the reader that it is not a good technique to look at the storyboard from a memory footprint perspective.

In order to compare our use of the Master-detail template in Xcode, the application Storyboarddemo based on the storyboard and the nib based application Nibdemo. Then through the instruments tool allocations template Analysis of the Viewcontroller view controller load, the amount of memory footprint differences. Nibdemo Engineering allocations Template tracking, Storyboarddemo Engineering allocations template tracking.

The screen starts when 00:02.776.562 milliseconds, memory occupies 1.10MB. The screen starts when 00:02.911.718 milliseconds, memory occupies 1.11MB. Nibdemo than Storyboarddemo screen start time is longer, memory to occupy more 0.01MB, that is about equal to 10KB.

By default, there is a storyboard file that integrates almost all the controllers in the application, and as the complexity of the business increases, the IB design screen in the storyboard becomes cluttered and the storyboard files become very large. The application is slow to load the storyboard, and the memory footprint increases.

In fact, nib is still a better technology, but can not express the navigation between the screen, screen navigation to hand-write code.

This article is from the "Dongsheng" blog, please be sure to keep this source http://2009315319.blog.51cto.com/701759/1133844

Related Article

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.