Properties of the Calayer

Source: Internet
Author: User

Properties Description whether implicit animations are supported
Anchorpoint A point position coincident with the center point, called an "anchor point," where the anchor is described by default at the center point of the image (0.5,0.5) relative to the X, Y position ratio Is
BackgroundColor Layer background color Is
BorderColor Border color Is
BorderWidth Border width Is
Bounds Layer Size Is
Contents Layers display content, such as the ability to display a picture as a layer content Is
Contentsrect The size and position of the layer display content Is
Cornerradius Fillet radius Is
doublesided If the back of the layer is displayed, the default is Yes Whether
Frame The layer size and position does not support implicit animation, so frame is rarely used in calayer, usually using bounds and position instead Whether
Hidden Whether to hide Is
Mask Layer Masks Is
Masktobounds Whether sublayers cut layer boundaries, default to No Is
Opacity Transparency, similar to the alpha of UIView Is
Position The location of the center point of the layer, similar to the UIView Is
Shadowcolor Shadow color Is
Shadowoffset Shadow Offset Is
Shadowopacity Shadow transparency, note the default is 0, this property must be set if the shadow is set Is
Shadowpath Shape of the Shadow Is
Shadowradius Shadow Blur Radius Is
Sublayers Sub-layer Is
Sublayertransform Child layer Deformation Is
Transform Layer deformation Is
    • Calayer in iOS is designed primarily for content presentation and animation operations, and Calayer itself is not included in Uikit, and it cannot respond to events.
    • Calayer Many properties can be animated when modified, which is called an implicit animation property. The essence of implicit property animation is that the change of these attributes implies the Cabasicanimation animation implementation by default; The frame property is rarely used in Calayer because the frame itself does not support animation effects, usually using bounds and position instead. transparency in Calayer uses opacity instead of alpha, and the center point uses a position representation instead of center.
    • The modification of a property is not animated for UIView's root layer, because in many cases the root layer acts more as a container
    • UIView root layer creation work is completely done by iOS and cannot be recreated, but you can add sublayers or remove sublayers to the root layer

Properties of the 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.