RAMPaperSwitch

public class RAMPaperSwitch: UISwitch

Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.

  • The total duration of the animations, measured in seconds. Default 0.35

    Declaration

    Swift

    @IBInspectable public var duration: Double = 0.35
  • Closuer call when animation start

    Declaration

    Swift

    public var animationDidStartClosure = {(onAnimation: Bool) -> Void in }
  • Closuer call when animation finish

    Declaration

    Swift

    public var animationDidStopClosure  = {(onAnimation: Bool, finished: Bool) -> Void in }
  • Returns an initialized switch object.

    Declaration

    Swift

    public required init(view: UIView?, color: UIColor?)

    Parameters

    view

    animatable view

    color

    The color which fill view.

    Return Value

    An initialized UISwitch object.