Ios-app optimization

Source: Internet
Author: User

1, optimize the TableView, correct identity reuse identity, do cell reuse, cache line high, reduce the number of subviews, use the right data structure to store data.

2, reuse and lazy loading views,view, not create all subviews at once, but wait until needed to create.

3, do not block the main thread, the main thread is mainly used to update the UI interface, the main thread blocking will cause the app to stutter.

4, caches, especially those that are unlikely to change but need to be read frequently, are taller than slices and tableview.

5, reuse large overhead objects, such as NSDateFormatter and Nscalendar. By static variables and this adds attributes to the class, similar to the simple interest object.

6, choose the correct data format, JSON or Xml,json smaller, transfer faster.

7, choose the right data storage format, such as storage of large amounts of data, Plist,nsuserdefault, nscoding are not appropriate, you can choose Core Data or SQLite

8, speed up the startup speed, as much as possible to do asynchronous tasks, such as loading server data, parsing data.

9, choose whether to cache pictures, picture loading two ways: imagenamed is suitable for repeated reuse, because when loading the picture will be cached; imagewithcontentoffile just loads the image.

10, correctly set the background picture, use full-frame background map when applicable to Uiimageview, use small tiling to do the background using Uicolor coloewithpatternimage.

Ios-app optimization

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.