Visual effects of iOS core animations

Source: Internet
Author: User

  1. Rounded Corners
    • Cornerradius determining the size of rounded corners
    • Maskstobounds determine if you want to cut the interface outside the fillet
  2. Layer border
    • BorderWidth the thickness of the bounding rectangle, point is the measure value.
    • BorderColor the color of the border, Cgcolorref type.
    • The border is drawn within the bounds of the layer, and before all child content, also before the child layer.

      The red layer is the sublayer of the white layer, but the border of the white layer appears in front of the red.
    • The border does not calculate the shape of the homestay or sublayer, and the border will still be drawn along the boundary of the layer if the layer's sublayers are beyond the bounds, or if the boarding chart has a transparent mask in the transparent area

      The boundary of the child layer exceeds the parent layer, and the boundaries of the parent layer are still visible.
  3. Shadow

    • Shadowopacity, shadow transparency. Must be between 0.0 (invisible) and 1.0 (completely opaque), the default is 0.
    • Shadowcolor Shadow Color
    • Shadowoffset direction and distance of shadows
    • Shadowradius the blur of the shadow. When its value is 0, the shadow has a very definite boundary line like the view. As they become more and more on duty, the boundary lines look increasingly blurred and natural.
    • Shadowpath. The shape of the shadow, which is a cgpathref type, is used to specify a vector graphic. This property allows us to specify the shape of the shadow separately from the layer shape.

      let squarePath = CGPathCreateMutable()//        CGPathAddRect(squarePath, nil, view3.layer.bounds)CGPathAddEllipseInRect(squarePath, nil, view3.layer.bounds)view3.layer.shadowPath = squarePath

Visual effects of iOS core animations

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.