iOS Development-No. 01-UI Basics-02-Picture Browse &tom Cat

Source: Internet
Author: User

Picture-Browsing Program implementation requirements:


1. Frame Properties

after Apple uses automatic layout, it is not recommended to use frame to resize the control unless automatic layout is turned off. and the frame property, typically used to instantiate the control, specify the initial position, if you need to change the space position, you can use the Center property, if you need to change the size of the control, you can use the Bounds property.


2, the end-to-end animation---use very little


3. Displacement deformation

Note: Code optimization via macros and View.tag is as follows



4. Rotation


5. Code Creation button


6. Lazy Loading


7, Plist---to achieve data separation


8. Lazy Loading Control processing

Function: Try to use the self when accessing the member variable, so that you can tell if the object has been created, not the order in which you want to consider the object creation. (That is, the layout of the order, because some of the control location calculation needs to consider the previous control position, the object created by the successive dependencies of each other, reducing the coupling between the code).


9, Strong & Weak


10, Tom Cat optimization

Note: When adding an animated frame sequence, be aware of freeing up memory!!! In this case, you need to release the self.tom.animationImages corresponding to the photo array.


---------------------------------------------------------------

Add: Code debugging techniques to determine if methods are called and what methods are called





iOS Development-No. 01-UI Basics-02-picture Browse &tom cat

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.