LWKShapeView

public class LWKShapeView : UIView

A UIView wrapper for a CAShapeLayer.

Exposes properties to customize the shape and its draw rules.

  • Path to descibe the shape. Path is copied when referenced. To make changes, be sure to reassign.

    Declaration

    Swift

    public var path: UIBezierPath? { get set }
  • The fill color for the interior of the shape. Set to nil to have a transparent fill.

    Declaration

    Swift

    public var fillColor: UIColor? { get set }
  • The Colors for each stop of the gradient. A single length array indicates a solid fill

    Declaration

    Swift

    public var fillColors: [UIColor]? { get set }
  • The location for each stop of the fill gradient as a normalized number. The length of this array matches the length of fillColors

    Declaration

    Swift

    public var fillGradientLocations: [NSNumber]? { get set }
  • The start point of the fill gradient. Defines where a ‘0’ location is. Either the start of a line for a linear gradient, or the center of a circle for a radial gradient.

    Declaration

    Swift

    public var fillGradientStartPoint: CGPoint { get set }
  • The end point of the gradient. Defines where a ‘1’ location is.

    Declaration

    Swift

    public var fillGradientEndPoint: CGPoint { get set }
  • The type of the gradient – either linear or radial.

    Declaration

    Swift

    public var fillGradientType: CAGradientLayerType { get set }
  • The fill rule for determining what is the inside of the path. Value can be kCAFillRuleNonZero or kCAFillRuleEvenOdd.

    Declaration

    Swift

    public var fillRule: CAShapeLayerFillRule { get set }
  • The stroke color for the shape. Set to nil to have no stroke.

    Declaration

    Swift

    public var strokeColor: UIColor? { get set }
  • The line width for the stroke.

    Declaration

    Swift

    public var lineWidth: CGFloat { get set }
  • The line cap for non-closed paths. Value can be kCALineCapButt, kCALineCapRound, or kCALineCapSquare.

    Declaration

    Swift

    public var lineCap: CAShapeLayerLineCap { get set }
  • The line join for the meeting point of two line segments. Value can be kCALineJoinMiter, kCALineJoinRound, or kCALineJoinBevel.

    Declaration

    Swift

    public var lineJoin: CAShapeLayerLineJoin { get set }
  • Determines the distance of drawn passed the edge of the path with a miter joint.

    Declaration

    Swift

    public var miterLimit: CGFloat { get set }
  • Dash pattern for the stroke. Set to nil to have a solid stroke.

    Declaration

    Swift

    public var lineDashPattern: [NSNumber]? { get set }
  • Offset of line dash pattern.

    Declaration

    Swift

    public var lineDashPhase: CGFloat { get set }