- Rounded Corners
- Cornerradius determining the size of rounded corners
- Maskstobounds determine if you want to cut the interface outside the fillet
- 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.
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