CALayer for IOS development

Source: Internet
Author: User

Before understanding CALayer, You Need To Know What layer is.

The middle layer of IOS development is a very important concept. You can find the layer component in the subclass of UIView. The layer is a child film located on a fixed canvas and can be overwritten. Layers are stacked together to generate an interface. This layer can contain multiple layers. You can operate other content on this layer, such as rotation, animation, and page flip.

However, if you want to access the layer attribute of the UIView class: CALayer * layer = myUIView. layer;

UIView has a root layer, and the final picture is displayed on the screen through the layer, and all the UIView subclass objects inherit this attribute. Layers can be understood in this simple way. For example, the following layer is the image background, and the above layer is the animation.

CALayer affects its appearance: layer size and background color
Whether the content uses rounded corner or shadow
And so on.

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.