iOS face question 03-ui control

Source: Internet
Author: User

UI control Face question

1. How to troubleshoot cache pool-side issues (cell)

Answer: There is no cache pool in 1.>os, because normally we develop iOS, objects are created when needed,

There is a common use of speaking called lazy loading, and in UITableView generally only create cells that start appearing on the screen, and then are taken from the cache pool, not creating new objects. The cache pool has a maximum of one or two objects, the cache pool full of this situation is generally common in the development of Java, Java generally the most recently used objects first released

2> a priority for objects with a lower number of times, the object with the longest cache time (let the young survive), priority removal of memory-intensive objects

Hierarchical structure of 2.CAAnimation

If you use Caanimation

1> Creating Caaimation Objects

2> setting properties of Caanimation objects

3> add Caanimation object to Calayer, Calayer will automatically perform this animation

[Email protected] "bounds";

Hierarchical structure of 3.UIButton and UITableView

Answer:1> inheritance Structure

2> structure of the inner child control

4. How to render a custom format string Uilabel

Answer:1> by Nsattributedstring class

5. Setting the contensize of scroll view can be set in Viewdidload, why

Answer:1> can

Any controller in the Create controller view at Viewdidload that moment 320x480, so Uiscrollview Contentsize is based on the sub-controller 0 view size 320x480, The contentsize is resized in the viewdidload, and when added to the controller The view size is resized to be smaller

When the sub-controller is added to the controller view, the child control view size is adjusted, and the view of the controller is created at Viewdidload, Viewwillappear, viewdidappear the moment the dimensions may be different

iOS face question 03-ui control

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.