diff --git a/GMStepper/GMStepper.swift b/GMStepper/GMStepper.swift index da5a252..efef1f4 100644 --- a/GMStepper/GMStepper.swift +++ b/GMStepper/GMStepper.swift @@ -122,6 +122,22 @@ import UIKit clipsToBounds = true } } + + /// Border width of the stepper and middle label's layer. Defaults to 0.0. + @IBInspectable public var borderWidth: CGFloat = 0.0 { + didSet { + layer.borderWidth = borderWidth + label.layer.borderWidth = borderWidth + } + } + + /// Color of the border of the stepper and middle label's layer. Defaults to clear color. + @IBInspectable public var borderColor: UIColor = UIColor.clearColor() { + didSet { + layer.borderColor = borderColor.CGColor + label.layer.borderColor = borderColor.CGColor + } + } /// Percentage of the middle label's width. Must be between 0 and 1. Defaults to 0.5. Be sure that it is wide enough to show the value. @IBInspectable public var labelWidthWeight: CGFloat = 0.5 { diff --git a/GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard b/GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard index bf995ae..7c31024 100644 --- a/GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard +++ b/GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -19,8 +19,7 @@ - - + @@ -36,7 +35,6 @@ - @@ -65,7 +63,6 @@ - @@ -90,8 +87,7 @@ - - + @@ -131,8 +127,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -143,7 +175,9 @@ + + @@ -154,6 +188,7 @@ +