on master help sign in
Update GMStepper.swift
commit88dd8d76b668141b7b8872b2f6ca65796caf709f authorshamsmosowi <shams.mosowi@gmail.com> dateSun 23 Apr 2017, 19:55 (9 years ago) parent07616aa
1 file changed+9
GMStepper/GMStepper.swift+9
GMStepper/GMStepper.swift+9
@@ -121,6 +121,13 @@ import UIKit
121121 label.font = labelFont
122122 }
123123 }
124+ /// Corner radius of the middle label. Defaults to 0.
125+ @IBInspectable public var labelCornerRadius: CGFloat = 0 {
126+ didSet {
127+ label.layer.cornerRadius = labelCornerRadius
128+
129+ }
130+ }
124131
125132 /// Corner radius of the stepper's layer. Defaults to 4.0.
126133 @IBInspectable public var cornerRadius: CGFloat = 4.0 {
@@ -205,6 +212,8 @@ import UIKit
205212 label.textColor = self.labelTextColor
206213 label.backgroundColor = self.labelBackgroundColor
207214 label.font = self.labelFont
215+ label.layer.cornerRadius = self.labelCornerRadius
216+ label.layer.masksToBounds = true
208217 label.isUserInteractionEnabled = true
209218 let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
210219 panRecognizer.maximumNumberOfTouches = 1