iOS Development-calayer

Source: Internet
Author: User

First, Calayer and UIView

Unix/linux's interface design has a general motto of "providing a mechanism rather than a strategy". The differential treatment mechanism (mechanism) and policy are a major highlight of Unix design.

Compared to iOS development, UIView has gestures, block animation and so on, Calayer focus on content display and drawing;

UIView with version upgrades, changes are often made, and calayer rarely changes.

UIView also encapsulates the properties and functions of calayer for developers to get started.

Ii. introduction of Calayer

The Calayer class manages the display and animation of image-based content. Layer is often used to provide a view display, but it can also be used directly. Layer's main task is to manage the provided visible content, while the layer also has its own visible properties, such as background color, borders, shadows, and so on. In addition to managing visible content, layer also has geometric information about its contents (such as position, size, and transformations) that are used to display on the screen. Modifying the properties above the layer produces an implicit animation.

If the layer is created by view, then the delegate of the layer is view and is not allowed to be modified.

Third, the use of Calayer

See reference.

Reference

Mechanism and strategy http://blog.chinaunix.net/uid-21736802-id-1817824.html

Why are there Calayer http://www.cocoachina.com/ios/20150828/13257.html

Objc-layer http://objccn.io/issue-12-4/

A detailed tutorial on layer http://blog.csdn.net/maylorchao/article/details/42652161

iOS Development-calayer

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.