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