on master help sign in
11 files changed+365−242
since splitsnapshots
unifiedsplit
.gitignore+2 .swift-version+1 GMStepper.podspec+2−2 GMStepper/GMStepper.swift+133−74 GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj+132−111 GMStepperExample/GMStepperExample/AppDelegate.swift+10−10 GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard+63−32 GMStepperExample/GMStepperExample/ViewController.swift+2−2 GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swift+3−3 GMStepperExample/GMStepperExampleTests/Info.plist−2 README.md+17−6
.gitignore+2
@@ -31,3 +31,5 @@ DerivedData
3131# Carthage/Checkouts
3232
3333Carthage/Build
34+
35+.DS_Store
.swift-versionnew file+1
@@ -0,0 +1 @@
1+4.0
GMStepper.podspec+2−2
@@ -1,9 +1,9 @@
11Pod::Spec.new do |s|
22 s.name = "GMStepper"
3− s.version = "1.1.0"
3+ s.version = "2.1"
44 s.summary = "A stepper with a sliding label in the middle."
55 s.homepage = "https://github.com/gmertk/GMStepper"
6− s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"
6+ s.screenshots = "https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif"
77 s.license = 'MIT'
88 s.author = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com" }
99 s.source = { :git => "https://github.com/gmertk/GMStepper.git", :tag => s.version.to_s }
GMStepper/GMStepper.swift+133−74
@@ -11,72 +11,79 @@ import UIKit
1111@IBDesignable public class GMStepper: UIControl {
1212
1313 /// Current value of the stepper. Defaults to 0.
14− @IBInspectable public var value: Double = 0 {
14+ @objc @IBInspectable public var value: Double = 0 {
1515 didSet {
1616 value = min(maximumValue, max(minimumValue, value))
1717
1818 let isInteger = floor(value) == value
19−
20− if showIntegerIfDoubleIsInteger && isInteger {
19+
20+ //
21+ // If we have items, we will display them as steps
22+ //
23+
24+ if isInteger && stepValue == 1.0 && items.count > 0 {
25+ label.text = items[Int(value)]
26+ }
27+ else if showIntegerIfDoubleIsInteger && isInteger {
2128 label.text = String(stringInterpolationSegment: Int(value))
2229 } else {
2330 label.text = String(stringInterpolationSegment: value)
2431 }
2532
2633 if oldValue != value {
27− sendActionsForControlEvents(.ValueChanged)
34+ sendActions(for: .valueChanged)
2835 }
2936 }
3037 }
3138
3239 /// Minimum value. Must be less than maximumValue. Defaults to 0.
33− @IBInspectable public var minimumValue: Double = 0 {
40+ @objc @IBInspectable public var minimumValue: Double = 0 {
3441 didSet {
3542 value = min(maximumValue, max(minimumValue, value))
3643 }
3744 }
3845
3946 /// Maximum value. Must be more than minimumValue. Defaults to 100.
40− @IBInspectable public var maximumValue: Double = 100 {
47+ @objc @IBInspectable public var maximumValue: Double = 100 {
4148 didSet {
4249 value = min(maximumValue, max(minimumValue, value))
4350 }
4451 }
4552
4653 /// Step/Increment value as in UIStepper. Defaults to 1.
47− @IBInspectable public var stepValue: Double = 1
54+ @objc @IBInspectable public var stepValue: Double = 1
4855
4956 /// The same as UIStepper's autorepeat. If true, holding on the buttons or keeping the pan gesture alters the value repeatedly. Defaults to true.
50− @IBInspectable public var autorepeat: Bool = true
57+ @objc @IBInspectable public var autorepeat: Bool = true
5158
5259 /// If the value is integer, it is shown without floating point.
53− @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
60+ @objc @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
5461
5562 /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
56− @IBInspectable public var leftButtonText: String = "−" {
63+ @objc @IBInspectable public var leftButtonText: String = "−" {
5764 didSet {
58− leftButton.setTitle(leftButtonText, forState: .Normal)
65+ leftButton.setTitle(leftButtonText, for: .normal)
5966 }
6067 }
6168
6269 /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
63− @IBInspectable public var rightButtonText: String = "+" {
70+ @objc @IBInspectable public var rightButtonText: String = "+" {
6471 didSet {
65− rightButton.setTitle(rightButtonText, forState: .Normal)
72+ rightButton.setTitle(rightButtonText, for: .normal)
6673 }
6774 }
6875
6976 /// Text color of the buttons. Defaults to white.
70− @IBInspectable public var buttonsTextColor: UIColor = UIColor.whiteColor() {
77+ @objc @IBInspectable public var buttonsTextColor: UIColor = UIColor.white {
7178 didSet {
7279 for button in [leftButton, rightButton] {
73− button.setTitleColor(buttonsTextColor, forState: .Normal)
80+ button.setTitleColor(buttonsTextColor, for: .normal)
7481 }
7582 }
7683 }
7784
7885 /// Background color of the buttons. Defaults to dark blue.
79− @IBInspectable public var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1) {
86+ @objc @IBInspectable public var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1) {
8087 didSet {
8188 for button in [leftButton, rightButton] {
8289 button.backgroundColor = buttonsBackgroundColor
@@ -86,7 +93,7 @@ import UIKit
8693 }
8794
8895 /// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
89− public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
96+ @objc public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
9097 didSet {
9198 for button in [leftButton, rightButton] {
9299 button.titleLabel?.font = buttonsFont
@@ -95,36 +102,59 @@ import UIKit
95102 }
96103
97104 /// Text color of the middle label. Defaults to white.
98− @IBInspectable public var labelTextColor: UIColor = UIColor.whiteColor() {
105+ @objc @IBInspectable public var labelTextColor: UIColor = UIColor.white {
99106 didSet {
100107 label.textColor = labelTextColor
101108 }
102109 }
103110
104111 /// Text color of the middle label. Defaults to lighter blue.
105− @IBInspectable public var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1) {
112+ @objc @IBInspectable public var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1) {
106113 didSet {
107114 label.backgroundColor = labelBackgroundColor
108115 }
109116 }
110117
111118 /// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
112− public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
119+ @objc public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
113120 didSet {
114121 label.font = labelFont
115122 }
116123 }
124+ /// Corner radius of the middle label. Defaults to 0.
125+ @objc @IBInspectable public var labelCornerRadius: CGFloat = 0 {
126+ didSet {
127+ label.layer.cornerRadius = labelCornerRadius
128+
129+ }
130+ }
117131
118132 /// Corner radius of the stepper's layer. Defaults to 4.0.
119− @IBInspectable public var cornerRadius: CGFloat = 4.0 {
133+ @objc @IBInspectable public var cornerRadius: CGFloat = 4.0 {
120134 didSet {
121135 layer.cornerRadius = cornerRadius
122136 clipsToBounds = true
123137 }
124138 }
139+
140+ /// Border width of the stepper and middle label's layer. Defaults to 0.0.
141+ @objc @IBInspectable public var borderWidth: CGFloat = 0.0 {
142+ didSet {
143+ layer.borderWidth = borderWidth
144+ label.layer.borderWidth = borderWidth
145+ }
146+ }
147+
148+ /// Color of the border of the stepper and middle label's layer. Defaults to clear color.
149+ @objc @IBInspectable public var borderColor: UIColor = UIColor.clear {
150+ didSet {
151+ layer.borderColor = borderColor.cgColor
152+ label.layer.borderColor = borderColor.cgColor
153+ }
154+ }
125155
126156 /// 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.
127− @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
157+ @objc @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
128158 didSet {
129159 labelWidthWeight = min(1, max(0, labelWidthWeight))
130160 setNeedsLayout()
@@ -132,7 +162,7 @@ import UIKit
132162 }
133163
134164 /// Color of the flashing animation on the buttons in case the value hit the limit.
135− @IBInspectable public var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
165+ @objc @IBInspectable public var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
136166
137167 /**
138168 Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
@@ -140,38 +170,40 @@ import UIKit
140170 let labelSlideLength: CGFloat = 5
141171
142172 /// Duration of the sliding animation
143− let labelSlideDuration = NSTimeInterval(0.1)
173+ let labelSlideDuration = TimeInterval(0.1)
144174
145175 /// Duration of the animation when the value hits the limit.
146− let limitHitAnimationDuration = NSTimeInterval(0.1)
176+ let limitHitAnimationDuration = TimeInterval(0.1)
147177
148178 lazy var leftButton: UIButton = {
149179 let button = UIButton()
150− button.setTitle(self.leftButtonText, forState: .Normal)
151− button.setTitleColor(self.buttonsTextColor, forState: .Normal)
180+ button.setTitle(self.leftButtonText, for: .normal)
181+ button.setTitleColor(self.buttonsTextColor, for: .normal)
152182 button.backgroundColor = self.buttonsBackgroundColor
153183 button.titleLabel?.font = self.buttonsFont
154− button.addTarget(self, action: "leftButtonTouchDown:", forControlEvents: .TouchDown)
155− button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpInside)
156− button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpOutside)
184+ button.addTarget(self, action: #selector(GMStepper.leftButtonTouchDown), for: .touchDown)
185+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
186+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
187+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
157188 return button
158189 }()
159190
160191 lazy var rightButton: UIButton = {
161192 let button = UIButton()
162− button.setTitle(self.rightButtonText, forState: .Normal)
163− button.setTitleColor(self.buttonsTextColor, forState: .Normal)
193+ button.setTitle(self.rightButtonText, for: .normal)
194+ button.setTitleColor(self.buttonsTextColor, for: .normal)
164195 button.backgroundColor = self.buttonsBackgroundColor
165196 button.titleLabel?.font = self.buttonsFont
166− button.addTarget(self, action: "rightButtonTouchDown:", forControlEvents: .TouchDown)
167− button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpInside)
168− button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpOutside)
197+ button.addTarget(self, action: #selector(GMStepper.rightButtonTouchDown), for: .touchDown)
198+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
199+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
200+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
169201 return button
170202 }()
171203
172204 lazy var label: UILabel = {
173205 let label = UILabel()
174− label.textAlignment = .Center
206+ label.textAlignment = .center
175207 if self.showIntegerIfDoubleIsInteger && floor(self.value) == self.value {
176208 label.text = String(stringInterpolationSegment: Int(self.value))
177209 } else {
@@ -180,8 +212,10 @@ import UIKit
180212 label.textColor = self.labelTextColor
181213 label.backgroundColor = self.labelBackgroundColor
182214 label.font = self.labelFont
183− label.userInteractionEnabled = true
184− let panRecognizer = UIPanGestureRecognizer(target: self, action: "handlePan:")
215+ label.layer.cornerRadius = self.labelCornerRadius
216+ label.layer.masksToBounds = true
217+ label.isUserInteractionEnabled = true
218+ let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
185219 panRecognizer.maximumNumberOfTouches = 1
186220 label.addGestureRecognizer(panRecognizer)
187221 return label
@@ -209,9 +243,33 @@ import UIKit
209243 }
210244 }
211245 }
246+
247+
248+ @objc public var items : [String] = [] {
249+ didSet {
250+ let isInteger = floor(value) == value
251+
252+ //
253+ // If we have items, we will display them as steps
254+ //
255+
256+ if isInteger && stepValue == 1.0 && items.count > 0 {
257+
258+ var value = Int(self.value)
259+
260+ if value >= items.count {
261+ value = items.count - 1
262+ self.value = Double(value)
263+ }
264+ else {
265+ label.text = items[value]
266+ }
267+ }
268+ }
269+ }
212270
213271 /// Timer used for autorepeat option
214− var timer: NSTimer?
272+ var timer: Timer?
215273
216274 /** When UIStepper reaches its top speed, it alters the value with a time interval of ~0.05 sec.
217275 The user pressing and holding on the stepper repeatedly:
@@ -219,7 +277,7 @@ import UIKit
219277 - For the next 1.5 sec, it changes the value every 0.1 sec.
220278 - Then, every 0.05 sec.
221279 */
222− let timerInterval = NSTimeInterval(0.05)
280+ let timerInterval = TimeInterval(0.05)
223281
224282 /// Check the handleTimerFire: function. While it is counting the number of fires, it decreases the mod value so that the value is altered more frequently.
225283 var timerFireCount = 0
@@ -233,12 +291,12 @@ import UIKit
233291 }
234292 }
235293
236− required public init?(coder aDecoder: NSCoder) {
294+ @objc required public init?(coder aDecoder: NSCoder) {
237295 super.init(coder: aDecoder)
238296 setup()
239297 }
240298
241− public override init(frame: CGRect) {
299+ @objc public override init(frame: CGRect) {
242300 super.init(frame: frame)
243301 setup()
244302 }
@@ -251,8 +309,9 @@ import UIKit
251309 backgroundColor = buttonsBackgroundColor
252310 layer.cornerRadius = cornerRadius
253311 clipsToBounds = true
312+ labelOriginalCenter = label.center
254313
255− NSNotificationCenter.defaultCenter().addObserver(self, selector: "reset", name: UIApplicationWillResignActiveNotification, object: nil)
314+ NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
256315 }
257316
258317 public override func layoutSubviews() {
@@ -278,7 +337,7 @@ import UIKit
278337
279338 deinit {
280339 resetTimer()
281− NSNotificationCenter.defaultCenter().removeObserver(self)
340+ NotificationCenter.default.removeObserver(self)
282341 }
283342
284343 /// Useful closure for logging the timer interval. You can call this in the timer handler to test the autorepeat option. Not used in the current implementation.
@@ -297,17 +356,17 @@ import UIKit
297356
298357// MARK: Pan Gesture
299358extension GMStepper {
300− func handlePan(gesture: UIPanGestureRecognizer) {
359+ @objc func handlePan(gesture: UIPanGestureRecognizer) {
301360 switch gesture.state {
302− case .Began:
303− leftButton.enabled = false
304− rightButton.enabled = false
305− case .Changed:
306− let translation = gesture.translationInView(label)
307− gesture.setTranslation(CGPointZero, inView: label)
361+ case .began:
362+ leftButton.isEnabled = false
363+ rightButton.isEnabled = false
364+ case .changed:
365+ let translation = gesture.translation(in: label)
366+ gesture.setTranslation(CGPoint.zero, in: label)
308367
309− let slidingRight = gesture.velocityInView(label).x > 0
310− let slidingLeft = gesture.velocityInView(label).x < 0
368+ let slidingRight = gesture.velocity(in: label).x > 0
369+ let slidingLeft = gesture.velocity(in: label).x < 0
311370
312371 // Move the label with pan
313372 if slidingRight {
@@ -340,23 +399,23 @@ extension GMStepper {
340399 self.rightButton.backgroundColor = self.buttonsBackgroundColor
341400 self.leftButton.backgroundColor = self.buttonsBackgroundColor
342401 }
343− case .Ended, .Cancelled, .Failed:
402+ case .ended, .cancelled, .failed:
344403 reset()
345404 default:
346405 break
347406 }
348407 }
349408
350− func reset() {
409+ @objc func reset() {
351410 panState = .Stable
352411 stepperState = .Stable
353412 resetTimer()
354413
355− leftButton.enabled = true
356− rightButton.enabled = true
357− label.userInteractionEnabled = true
414+ leftButton.isEnabled = true
415+ rightButton.isEnabled = true
416+ label.isUserInteractionEnabled = true
358417
359− UIView.animateWithDuration(self.labelSlideDuration, animations: {
418+ UIView.animate(withDuration: self.labelSlideDuration, animations: {
360419 self.label.center = self.labelOriginalCenter
361420 self.rightButton.backgroundColor = self.buttonsBackgroundColor
362421 self.leftButton.backgroundColor = self.buttonsBackgroundColor
@@ -366,9 +425,9 @@ extension GMStepper {
366425
367426// MARK: Button Events
368427extension GMStepper {
369− func leftButtonTouchDown(button: UIButton) {
370− rightButton.enabled = false
371− label.userInteractionEnabled = false
428+ @objc func leftButtonTouchDown(button: UIButton) {
429+ rightButton.isEnabled = false
430+ label.isUserInteractionEnabled = false
372431 resetTimer()
373432
374433 if value == minimumValue {
@@ -380,9 +439,9 @@ extension GMStepper {
380439
381440 }
382441
383− func rightButtonTouchDown(button: UIButton) {
384− leftButton.enabled = false
385− label.userInteractionEnabled = false
442+ @objc func rightButtonTouchDown(button: UIButton) {
443+ leftButton.isEnabled = false
444+ label.isUserInteractionEnabled = false
386445 resetTimer()
387446
388447 if value == maximumValue {
@@ -393,7 +452,7 @@ extension GMStepper {
393452 }
394453 }
395454
396− func buttonTouchUp(button: UIButton) {
455+ @objc func buttonTouchUp(button: UIButton) {
397456 reset()
398457 }
399458}
@@ -402,20 +461,20 @@ extension GMStepper {
402461extension GMStepper {
403462
404463 func animateSlideLeft() {
405− UIView.animateWithDuration(labelSlideDuration) {
464+ UIView.animate(withDuration: labelSlideDuration) {
406465 self.label.center.x -= self.labelSlideLength
407466 }
408467 }
409468
410469 func animateSlideRight() {
411− UIView.animateWithDuration(labelSlideDuration) {
470+ UIView.animate(withDuration: labelSlideDuration) {
412471 self.label.center.x += self.labelSlideLength
413472 }
414473 }
415474
416475 func animateToOriginalPosition() {
417476 if self.label.center != self.labelOriginalCenter {
418− UIView.animateWithDuration(labelSlideDuration) {
477+ UIView.animate(withDuration: labelSlideDuration) {
419478 self.label.center = self.labelOriginalCenter
420479 }
421480 }
@@ -423,14 +482,14 @@ extension GMStepper {
423482
424483 func animateLimitHitIfNeeded() {
425484 if value == minimumValue {
426− animateLimitHitForButton(leftButton)
485+ animateLimitHitForButton(button: leftButton)
427486 } else if value == maximumValue {
428− animateLimitHitForButton(rightButton)
487+ animateLimitHitForButton(button: rightButton)
429488 }
430489 }
431490
432491 func animateLimitHitForButton(button: UIButton){
433− UIView.animateWithDuration(limitHitAnimationDuration) {
492+ UIView.animate(withDuration: limitHitAnimationDuration) {
434493 button.backgroundColor = self.limitHitAnimationColor
435494 }
436495 }
@@ -438,7 +497,7 @@ extension GMStepper {
438497
439498// MARK: Timer
440499extension GMStepper {
441− func handleTimerFire(timer: NSTimer) {
500+ @objc func handleTimerFire(timer: Timer) {
442501 timerFireCount += 1
443502
444503 if timerFireCount % timerFireCountModulo == 0 {
@@ -447,7 +506,7 @@ extension GMStepper {
447506 }
448507
449508 func scheduleTimer() {
450− timer = NSTimer.scheduledTimerWithTimeInterval(timerInterval, target: self, selector: "handleTimerFire:", userInfo: nil, repeats: true)
509+ timer = Timer.scheduledTimer(timeInterval: timerInterval, target: self, selector: #selector(GMStepper.handleTimerFire), userInfo: nil, repeats: true)
451510 }
452511
453512 func resetTimer() {
GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj+132−111
@@ -7,18 +7,18 @@
77 objects = {
88
99/* Begin PBXBuildFile section */
10− 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
10+ 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3116C0DA1DA4DD360015AC69 /* GMStepperExampleTests.swift */; };
11+ 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
1112 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
1213 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
1314 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
1415 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
1516 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */; };
16− 319C194E1B4843EB005EFEE5 /* GMStepperExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C194D1B4843EB005EFEE5 /* GMStepperExampleTests.swift */; };
1717 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
1818/* End PBXBuildFile section */
1919
2020/* Begin PBXContainerItemProxy section */
21− 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */ = {
21+ 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */ = {
2222 isa = PBXContainerItemProxy;
2323 containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
2424 proxyType = 1;
@@ -28,6 +28,9 @@
2828/* End PBXContainerItemProxy section */
2929
3030/* Begin PBXFileReference section */
31+ 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMStepperExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
32+ 3116C0DA1DA4DD360015AC69 /* GMStepperExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMStepperExampleTests.swift; sourceTree = "<group>"; };
33+ 3116C0DC1DA4DD360015AC69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3134 319C19321B4843EB005EFEE5 /* GMStepperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
3235 319C19361B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3336 319C19371B4843EB005EFEE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -35,21 +38,18 @@
3538 319C193C1B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
3639 319C193E1B4843EB005EFEE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
3740 319C19411B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
38− 319C19471B4843EB005EFEE5 /* GMStepperExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMStepperExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
39− 319C194C1B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
40− 319C194D1B4843EB005EFEE5 /* GMStepperExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMStepperExampleTests.swift; sourceTree = "<group>"; };
4141 319C195B1B48445E005EFEE5 /* GMStepper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GMStepper.swift; sourceTree = "<group>"; };
4242/* End PBXFileReference section */
4343
4444/* Begin PBXFrameworksBuildPhase section */
45− 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
45+ 3116C0D51DA4DD360015AC69 /* Frameworks */ = {
4646 isa = PBXFrameworksBuildPhase;
4747 buildActionMask = 2147483647;
4848 files = (
4949 );
5050 runOnlyForDeploymentPostprocessing = 0;
5151 };
52− 319C19441B4843EB005EFEE5 /* Frameworks */ = {
52+ 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
5353 isa = PBXFrameworksBuildPhase;
5454 buildActionMask = 2147483647;
5555 files = (
@@ -59,12 +59,21 @@
5959/* End PBXFrameworksBuildPhase section */
6060
6161/* Begin PBXGroup section */
62+ 3116C0D91DA4DD360015AC69 /* GMStepperExampleTests */ = {
63+ isa = PBXGroup;
64+ children = (
65+ 3116C0DA1DA4DD360015AC69 /* GMStepperExampleTests.swift */,
66+ 3116C0DC1DA4DD360015AC69 /* Info.plist */,
67+ );
68+ path = GMStepperExampleTests;
69+ sourceTree = "<group>";
70+ };
6271 319C19291B4843EB005EFEE5 = {
6372 isa = PBXGroup;
6473 children = (
6574 319C195A1B48445E005EFEE5 /* GMStepper */,
6675 319C19341B4843EB005EFEE5 /* GMStepperExample */,
67− 319C194A1B4843EB005EFEE5 /* GMStepperExampleTests */,
76+ 3116C0D91DA4DD360015AC69 /* GMStepperExampleTests */,
6877 319C19331B4843EB005EFEE5 /* Products */,
6978 );
7079 sourceTree = "<group>";
@@ -73,7 +82,7 @@
7382 isa = PBXGroup;
7483 children = (
7584 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
76− 319C19471B4843EB005EFEE5 /* GMStepperExampleTests.xctest */,
85+ 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */,
7786 );
7887 name = Products;
7988 sourceTree = "<group>";
@@ -99,23 +108,6 @@
99108 name = "Supporting Files";
100109 sourceTree = "<group>";
101110 };
102− 319C194A1B4843EB005EFEE5 /* GMStepperExampleTests */ = {
103− isa = PBXGroup;
104− children = (
105− 319C194D1B4843EB005EFEE5 /* GMStepperExampleTests.swift */,
106− 319C194B1B4843EB005EFEE5 /* Supporting Files */,
107− );
108− path = GMStepperExampleTests;
109− sourceTree = "<group>";
110− };
111− 319C194B1B4843EB005EFEE5 /* Supporting Files */ = {
112− isa = PBXGroup;
113− children = (
114− 319C194C1B4843EB005EFEE5 /* Info.plist */,
115− );
116− name = "Supporting Files";
117− sourceTree = "<group>";
118− };
119111 319C195A1B48445E005EFEE5 /* GMStepper */ = {
120112 isa = PBXGroup;
121113 children = (
@@ -128,6 +120,24 @@
128120/* End PBXGroup section */
129121
130122/* Begin PBXNativeTarget section */
123+ 3116C0D71DA4DD360015AC69 /* GMStepperExampleTests */ = {
124+ isa = PBXNativeTarget;
125+ buildConfigurationList = 3116C0DF1DA4DD360015AC69 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */;
126+ buildPhases = (
127+ 3116C0D41DA4DD360015AC69 /* Sources */,
128+ 3116C0D51DA4DD360015AC69 /* Frameworks */,
129+ 3116C0D61DA4DD360015AC69 /* Resources */,
130+ );
131+ buildRules = (
132+ );
133+ dependencies = (
134+ 3116C0DE1DA4DD360015AC69 /* PBXTargetDependency */,
135+ );
136+ name = GMStepperExampleTests;
137+ productName = GMStepperExampleTests;
138+ productReference = 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */;
139+ productType = "com.apple.product-type.bundle.unit-test";
140+ };
131141 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
132142 isa = PBXNativeTarget;
133143 buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
@@ -145,24 +155,6 @@
145155 productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
146156 productType = "com.apple.product-type.application";
147157 };
148− 319C19461B4843EB005EFEE5 /* GMStepperExampleTests */ = {
149− isa = PBXNativeTarget;
150− buildConfigurationList = 319C19541B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */;
151− buildPhases = (
152− 319C19431B4843EB005EFEE5 /* Sources */,
153− 319C19441B4843EB005EFEE5 /* Frameworks */,
154− 319C19451B4843EB005EFEE5 /* Resources */,
155− );
156− buildRules = (
157− );
158− dependencies = (
159− 319C19491B4843EB005EFEE5 /* PBXTargetDependency */,
160− );
161− name = GMStepperExampleTests;
162− productName = GMStepperExampleTests;
163− productReference = 319C19471B4843EB005EFEE5 /* GMStepperExampleTests.xctest */;
164− productType = "com.apple.product-type.bundle.unit-test";
165− };
166158/* End PBXNativeTarget section */
167159
168160/* Begin PBXProject section */
@@ -170,16 +162,20 @@
170162 isa = PBXProject;
171163 attributes = {
172164 LastSwiftMigration = 0700;
173− LastSwiftUpdateCheck = 0700;
174− LastUpgradeCheck = 0700;
165+ LastSwiftUpdateCheck = 0800;
166+ LastUpgradeCheck = 0900;
175167 ORGANIZATIONNAME = "Gunay Mert Karadogan";
176168 TargetAttributes = {
177− 319C19311B4843EB005EFEE5 = {
178− CreatedOnToolsVersion = 6.4;
169+ 3116C0D71DA4DD360015AC69 = {
170+ CreatedOnToolsVersion = 8.0;
171+ LastSwiftMigration = 0900;
172+ ProvisioningStyle = Automatic;
173+ TestTargetID = 319C19311B4843EB005EFEE5;
179174 };
180− 319C19461B4843EB005EFEE5 = {
175+ 319C19311B4843EB005EFEE5 = {
181176 CreatedOnToolsVersion = 6.4;
182− TestTargetID = 319C19311B4843EB005EFEE5;
177+ DevelopmentTeam = 289M6XEDV4;
178+ LastSwiftMigration = 0900;
183179 };
184180 };
185181 };
@@ -197,58 +193,58 @@
197193 projectRoot = "";
198194 targets = (
199195 319C19311B4843EB005EFEE5 /* GMStepperExample */,
200− 319C19461B4843EB005EFEE5 /* GMStepperExampleTests */,
196+ 3116C0D71DA4DD360015AC69 /* GMStepperExampleTests */,
201197 );
202198 };
203199/* End PBXProject section */
204200
205201/* Begin PBXResourcesBuildPhase section */
206− 319C19301B4843EB005EFEE5 /* Resources */ = {
202+ 3116C0D61DA4DD360015AC69 /* Resources */ = {
207203 isa = PBXResourcesBuildPhase;
208204 buildActionMask = 2147483647;
209205 files = (
210− 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
211− 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
212− 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
213206 );
214207 runOnlyForDeploymentPostprocessing = 0;
215208 };
216− 319C19451B4843EB005EFEE5 /* Resources */ = {
209+ 319C19301B4843EB005EFEE5 /* Resources */ = {
217210 isa = PBXResourcesBuildPhase;
218211 buildActionMask = 2147483647;
219212 files = (
213+ 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
214+ 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
215+ 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
220216 );
221217 runOnlyForDeploymentPostprocessing = 0;
222218 };
223219/* End PBXResourcesBuildPhase section */
224220
225221/* Begin PBXSourcesBuildPhase section */
226− 319C192E1B4843EB005EFEE5 /* Sources */ = {
222+ 3116C0D41DA4DD360015AC69 /* Sources */ = {
227223 isa = PBXSourcesBuildPhase;
228224 buildActionMask = 2147483647;
229225 files = (
230− 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
231− 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
232− 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
226+ 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */,
227+ 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */,
233228 );
234229 runOnlyForDeploymentPostprocessing = 0;
235230 };
236− 319C19431B4843EB005EFEE5 /* Sources */ = {
231+ 319C192E1B4843EB005EFEE5 /* Sources */ = {
237232 isa = PBXSourcesBuildPhase;
238233 buildActionMask = 2147483647;
239234 files = (
240− 319C194E1B4843EB005EFEE5 /* GMStepperExampleTests.swift in Sources */,
241− 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */,
235+ 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
236+ 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
237+ 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
242238 );
243239 runOnlyForDeploymentPostprocessing = 0;
244240 };
245241/* End PBXSourcesBuildPhase section */
246242
247243/* Begin PBXTargetDependency section */
248− 319C19491B4843EB005EFEE5 /* PBXTargetDependency */ = {
244+ 3116C0DE1DA4DD360015AC69 /* PBXTargetDependency */ = {
249245 isa = PBXTargetDependency;
250246 target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
251− targetProxy = 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */;
247+ targetProxy = 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */;
252248 };
253249/* End PBXTargetDependency section */
254250
@@ -272,6 +268,44 @@
272268/* End PBXVariantGroup section */
273269
274270/* Begin XCBuildConfiguration section */
271+ 3116C0E01DA4DD360015AC69 /* Debug */ = {
272+ isa = XCBuildConfiguration;
273+ buildSettings = {
274+ BUNDLE_LOADER = "$(TEST_HOST)";
275+ CLANG_ANALYZER_NONNULL = YES;
276+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
277+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
278+ DEBUG_INFORMATION_FORMAT = dwarf;
279+ INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
280+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
281+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
282+ PRODUCT_BUNDLE_IDENTIFIER = com.gmertk.GMStepperExampleTests;
283+ PRODUCT_NAME = "$(TARGET_NAME)";
284+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
285+ SWIFT_SWIFT3_OBJC_INFERENCE = On;
286+ SWIFT_VERSION = 4.0;
287+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
288+ };
289+ name = Debug;
290+ };
291+ 3116C0E11DA4DD360015AC69 /* Release */ = {
292+ isa = XCBuildConfiguration;
293+ buildSettings = {
294+ BUNDLE_LOADER = "$(TEST_HOST)";
295+ CLANG_ANALYZER_NONNULL = YES;
296+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
297+ CLANG_WARN_SUSPICIOUS_MOVES = YES;
298+ INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
299+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
300+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
301+ PRODUCT_BUNDLE_IDENTIFIER = com.gmertk.GMStepperExampleTests;
302+ PRODUCT_NAME = "$(TARGET_NAME)";
303+ SWIFT_SWIFT3_OBJC_INFERENCE = On;
304+ SWIFT_VERSION = 4.0;
305+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
306+ };
307+ name = Release;
308+ };
275309 319C194F1B4843EB005EFEE5 /* Debug */ = {
276310 isa = XCBuildConfiguration;
277311 buildSettings = {
@@ -280,13 +314,21 @@
280314 CLANG_CXX_LIBRARY = "libc++";
281315 CLANG_ENABLE_MODULES = YES;
282316 CLANG_ENABLE_OBJC_ARC = YES;
317+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
283318 CLANG_WARN_BOOL_CONVERSION = YES;
319+ CLANG_WARN_COMMA = YES;
284320 CLANG_WARN_CONSTANT_CONVERSION = YES;
285321 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
286322 CLANG_WARN_EMPTY_BODY = YES;
287323 CLANG_WARN_ENUM_CONVERSION = YES;
324+ CLANG_WARN_INFINITE_RECURSION = YES;
288325 CLANG_WARN_INT_CONVERSION = YES;
326+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
289328 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
329+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
330+ CLANG_WARN_STRICT_PROTOTYPES = YES;
331+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
290332 CLANG_WARN_UNREACHABLE_CODE = YES;
291333 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
292334 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -325,13 +367,21 @@
325367 CLANG_CXX_LIBRARY = "libc++";
326368 CLANG_ENABLE_MODULES = YES;
327369 CLANG_ENABLE_OBJC_ARC = YES;
370+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
328371 CLANG_WARN_BOOL_CONVERSION = YES;
372+ CLANG_WARN_COMMA = YES;
329373 CLANG_WARN_CONSTANT_CONVERSION = YES;
330374 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
331375 CLANG_WARN_EMPTY_BODY = YES;
332376 CLANG_WARN_ENUM_CONVERSION = YES;
377+ CLANG_WARN_INFINITE_RECURSION = YES;
333378 CLANG_WARN_INT_CONVERSION = YES;
379+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
380+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
334381 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
382+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
383+ CLANG_WARN_STRICT_PROTOTYPES = YES;
384+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
335385 CLANG_WARN_UNREACHABLE_CODE = YES;
336386 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
337387 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -350,6 +400,7 @@
350400 IPHONEOS_DEPLOYMENT_TARGET = 8.4;
351401 MTL_ENABLE_DEBUG_INFO = NO;
352402 SDKROOT = iphoneos;
403+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
353404 VALIDATE_PRODUCT = YES;
354405 };
355406 name = Release;
@@ -358,10 +409,13 @@
358409 isa = XCBuildConfiguration;
359410 buildSettings = {
360411 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
412+ DEVELOPMENT_TEAM = 289M6XEDV4;
361413 INFOPLIST_FILE = GMStepperExample/Info.plist;
362414 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
363415 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
364416 PRODUCT_NAME = "$(TARGET_NAME)";
417+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
418+ SWIFT_VERSION = 4.0;
365419 };
366420 name = Debug;
367421 };
@@ -369,75 +423,42 @@
369423 isa = XCBuildConfiguration;
370424 buildSettings = {
371425 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
426+ DEVELOPMENT_TEAM = 289M6XEDV4;
372427 INFOPLIST_FILE = GMStepperExample/Info.plist;
373428 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
374429 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
375430 PRODUCT_NAME = "$(TARGET_NAME)";
376− };
377− name = Release;
378− };
379− 319C19551B4843EB005EFEE5 /* Debug */ = {
380− isa = XCBuildConfiguration;
381− buildSettings = {
382− BUNDLE_LOADER = "$(TEST_HOST)";
383− FRAMEWORK_SEARCH_PATHS = (
384− "$(SDKROOT)/Developer/Library/Frameworks",
385− "$(inherited)",
386− );
387− GCC_PREPROCESSOR_DEFINITIONS = (
388− "DEBUG=1",
389− "$(inherited)",
390− );
391− INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
392− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
393− PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
394− PRODUCT_NAME = "$(TARGET_NAME)";
395− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
396− };
397− name = Debug;
398− };
399− 319C19561B4843EB005EFEE5 /* Release */ = {
400− isa = XCBuildConfiguration;
401− buildSettings = {
402− BUNDLE_LOADER = "$(TEST_HOST)";
403− FRAMEWORK_SEARCH_PATHS = (
404− "$(SDKROOT)/Developer/Library/Frameworks",
405− "$(inherited)",
406− );
407− INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
408− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
409− PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
410− PRODUCT_NAME = "$(TARGET_NAME)";
411− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
431+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
432+ SWIFT_VERSION = 4.0;
412433 };
413434 name = Release;
414435 };
415436/* End XCBuildConfiguration section */
416437
417438/* Begin XCConfigurationList section */
418− 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
439+ 3116C0DF1DA4DD360015AC69 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
419440 isa = XCConfigurationList;
420441 buildConfigurations = (
421− 319C194F1B4843EB005EFEE5 /* Debug */,
422− 319C19501B4843EB005EFEE5 /* Release */,
442+ 3116C0E01DA4DD360015AC69 /* Debug */,
443+ 3116C0E11DA4DD360015AC69 /* Release */,
423444 );
424445 defaultConfigurationIsVisible = 0;
425446 defaultConfigurationName = Release;
426447 };
427− 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */ = {
448+ 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
428449 isa = XCConfigurationList;
429450 buildConfigurations = (
430− 319C19521B4843EB005EFEE5 /* Debug */,
431− 319C19531B4843EB005EFEE5 /* Release */,
451+ 319C194F1B4843EB005EFEE5 /* Debug */,
452+ 319C19501B4843EB005EFEE5 /* Release */,
432453 );
433454 defaultConfigurationIsVisible = 0;
434455 defaultConfigurationName = Release;
435456 };
436− 319C19541B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
457+ 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */ = {
437458 isa = XCConfigurationList;
438459 buildConfigurations = (
439− 319C19551B4843EB005EFEE5 /* Debug */,
440− 319C19561B4843EB005EFEE5 /* Release */,
460+ 319C19521B4843EB005EFEE5 /* Debug */,
461+ 319C19531B4843EB005EFEE5 /* Release */,
441462 );
442463 defaultConfigurationIsVisible = 0;
443464 defaultConfigurationName = Release;
GMStepperExample/GMStepperExample/AppDelegate.swift+10−10
@@ -14,33 +14,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414 var window: UIWindow?
1515
1616
17− func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1818 // Override point for customization after application launch.
1919 return true
2020 }
2121
22− func applicationWillResignActive(application: UIApplication) {
22+ func applicationWillResignActive(_ application: UIApplication) {
2323 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24− // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
24+ // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
2525 }
2626
27− func applicationDidEnterBackground(application: UIApplication) {
27+ func applicationDidEnterBackground(_ application: UIApplication) {
2828 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
2929 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3030 }
3131
32− func applicationWillEnterForeground(application: UIApplication) {
33− // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
32+ func applicationWillEnterForeground(_ application: UIApplication) {
33+ // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
3434 }
3535
36− func applicationDidBecomeActive(application: UIApplication) {
36+ func applicationDidBecomeActive(_ application: UIApplication) {
3737 // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
3838 }
3939
40− func applicationWillTerminate(application: UIApplication) {
40+ func applicationWillTerminate(_ application: UIApplication) {
4141 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4242 }
43−
44−
43+
44+
4545}
4646
GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard+63−32
@@ -1,9 +1,10 @@
11<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
33 <dependencies>
44 <deployment identifier="iOS"/>
5− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
5+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
66 <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
7+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
78 </dependencies>
89 <scenes>
910 <!--View Controller-->
@@ -15,13 +16,11 @@
1516 <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
1617 </layoutGuides>
1718 <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
18− <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
19+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1920 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2021 <subviews>
2122 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AU6-4C-B2F" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
22− <rect key="frame" x="24" y="28" width="552" height="44"/>
23− <animations/>
24− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
23+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2524 <constraints>
2625 <constraint firstAttribute="height" constant="44" id="6mC-hP-wFD"/>
2726 </constraints>
@@ -35,28 +34,26 @@
3534 </userDefinedRuntimeAttributes>
3635 </view>
3736 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="if7-U5-bAM" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
38− <rect key="frame" x="140" y="116" width="320" height="66"/>
39− <animations/>
40− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
37+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4138 <constraints>
4239 <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
4340 <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
4441 </constraints>
4542 <userDefinedRuntimeAttributes>
4643 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
47− <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="calibratedRGB"/>
44+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4845 </userDefinedRuntimeAttribute>
4946 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
50− <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="calibratedRGB"/>
47+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5148 </userDefinedRuntimeAttribute>
5249 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
53− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
50+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5451 </userDefinedRuntimeAttribute>
5552 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
56− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
53+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5754 </userDefinedRuntimeAttribute>
5855 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
59− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
56+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6057 </userDefinedRuntimeAttribute>
6158 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
6259 <real key="value" value="0.5"/>
@@ -64,51 +61,47 @@
6461 </userDefinedRuntimeAttributes>
6562 </view>
6663 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R9n-I0-fq7" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
67− <rect key="frame" x="200" y="226" width="200" height="66"/>
68− <animations/>
69− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
64+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
7065 <constraints>
7166 <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
7267 <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
7368 </constraints>
7469 <userDefinedRuntimeAttributes>
7570 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
76− <color key="value" red="0.1819814891" green="0.69426733259999995" blue="0.53024792669999998" alpha="1" colorSpace="calibratedRGB"/>
71+ <color key="value" red="0.1819814891" green="0.69426733259999995" blue="0.53024792669999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
7772 </userDefinedRuntimeAttribute>
7873 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
79− <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
74+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8075 </userDefinedRuntimeAttribute>
8176 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
82− <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
77+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8378 </userDefinedRuntimeAttribute>
8479 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
85− <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
80+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8681 </userDefinedRuntimeAttribute>
8782 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
88− <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
83+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8984 </userDefinedRuntimeAttribute>
9085 </userDefinedRuntimeAttributes>
9186 </view>
9287 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U8X-8Z-7Mo" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
93− <rect key="frame" x="24" y="336" width="552" height="44"/>
94− <animations/>
95− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
88+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
9689 <constraints>
9790 <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
9891 <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
9992 </constraints>
10093 <userDefinedRuntimeAttributes>
10194 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
102− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
95+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
10396 </userDefinedRuntimeAttribute>
10497 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
105− <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
98+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
10699 </userDefinedRuntimeAttribute>
107100 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
108− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
101+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
109102 </userDefinedRuntimeAttribute>
110103 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
111− <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
104+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
112105 </userDefinedRuntimeAttribute>
113106 <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
114107 <real key="value" value="0.69999999999999996"/>
@@ -119,7 +112,7 @@
119112 <integer key="value" value="0"/>
120113 </userDefinedRuntimeAttribute>
121114 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
122− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
115+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
123116 </userDefinedRuntimeAttribute>
124117 <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
125118 <integer key="value" value="100"/>
@@ -131,9 +124,44 @@
131124 </mask>
132125 </variation>
133126 </view>
127+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Ri-Yr-sRs" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
128+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
129+ <constraints>
130+ <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
131+ <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
132+ </constraints>
133+ <userDefinedRuntimeAttributes>
134+ <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
135+ <real key="value" value="10"/>
136+ </userDefinedRuntimeAttribute>
137+ <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
138+ <real key="value" value="1"/>
139+ </userDefinedRuntimeAttribute>
140+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
141+ <real key="value" value="2"/>
142+ </userDefinedRuntimeAttribute>
143+ <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
144+ <real key="value" value="4"/>
145+ </userDefinedRuntimeAttribute>
146+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
147+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
148+ </userDefinedRuntimeAttribute>
149+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
150+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
151+ </userDefinedRuntimeAttribute>
152+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
153+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
154+ </userDefinedRuntimeAttribute>
155+ <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
156+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
157+ </userDefinedRuntimeAttribute>
158+ <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
159+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
160+ </userDefinedRuntimeAttribute>
161+ </userDefinedRuntimeAttributes>
162+ </view>
134163 </subviews>
135− <animations/>
136− <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
164+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
137165 <constraints>
138166 <constraint firstItem="R9n-I0-fq7" firstAttribute="centerX" secondItem="U8X-8Z-7Mo" secondAttribute="centerX" id="3cD-WW-Qg4"/>
139167 <constraint firstItem="if7-U5-bAM" firstAttribute="top" secondItem="AU6-4C-B2F" secondAttribute="bottom" constant="44" id="662-W9-CUn"/>
@@ -143,7 +171,9 @@
143171 <constraint firstItem="if7-U5-bAM" firstAttribute="centerX" secondItem="R9n-I0-fq7" secondAttribute="centerX" id="K7g-rC-ehJ"/>
144172 <constraint firstItem="U8X-8Z-7Mo" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="8" id="S1b-pD-UXA"/>
145173 <constraint firstItem="U8X-8Z-7Mo" firstAttribute="top" secondItem="R9n-I0-fq7" secondAttribute="bottom" constant="44" id="fBW-Xx-pa0"/>
174+ <constraint firstItem="9Ri-Yr-sRs" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="fay-qT-jKR"/>
146175 <constraint firstItem="AU6-4C-B2F" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="8" id="iIM-b2-jzV"/>
176+ <constraint firstItem="9Ri-Yr-sRs" firstAttribute="top" secondItem="U8X-8Z-7Mo" secondAttribute="bottom" constant="44" id="nKi-Fp-8B7"/>
147177 <constraint firstAttribute="trailingMargin" secondItem="U8X-8Z-7Mo" secondAttribute="trailing" constant="8" id="ppd-nb-fL8"/>
148178 <constraint firstItem="AU6-4C-B2F" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="8" symbolic="YES" id="zDK-gF-kms"/>
149179 </constraints>
@@ -154,6 +184,7 @@
154184 </viewController>
155185 <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
156186 </objects>
187+ <point key="canvasLocation" x="274" y="363"/>
157188 </scene>
158189 </scenes>
159190</document>
GMStepperExample/GMStepperExample/ViewController.swift+2−2
@@ -13,10 +13,10 @@ class ViewController: UIViewController {
1313 @IBOutlet weak var stepper: GMStepper!
1414 override func viewDidLoad() {
1515 super.viewDidLoad()
16− stepper.addTarget(self, action: "stepperValueChanged:", forControlEvents: .ValueChanged)
16+ stepper.addTarget(self, action: #selector(ViewController.stepperValueChanged), for: .valueChanged)
1717 }
1818
19− func stepperValueChanged(stepper: GMStepper) {
19+ @objc func stepperValueChanged(stepper: GMStepper) {
2020 print(stepper.value, terminator: "")
2121 }
2222}
GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swift+3−3
@@ -6,8 +6,8 @@
66// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
77//
88
9−import UIKit
109import XCTest
10+import UIKit
1111
1212class GMStepperExampleTests: XCTestCase {
1313 var stepper: GMStepper!
@@ -37,6 +37,6 @@ class GMStepperExampleTests: XCTestCase {
3737
3838 XCTAssert(stepper.value == stepper.maximumValue, "Pass")
3939 }
40−
41−
40+
41+
4242}
GMStepperExample/GMStepperExampleTests/Info.plist−2
@@ -16,8 +16,6 @@
1616 <string>BNDL</string>
1717 <key>CFBundleShortVersionString</key>
1818 <string>1.0</string>
19− <key>CFBundleSignature</key>
20− <string>????</string>
2119 <key>CFBundleVersion</key>
2220 <string>1</string>
2321</dict>
README.md+17−6
@@ -5,6 +5,7 @@
55
66A stepper with a sliding label in the middle. Pan the label or tap the buttons. Check out the tutorial, [How to Build a Custom Stepper - Part 1](http://gmertk.github.io/custom-stepper-part-1/).
77
8+
89## Screenshot
910
1011![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
@@ -19,7 +20,7 @@ it, simply add the following lines to your Podfile:
1920use_frameworks!
2021pod "GMStepper"
2122```
22−
23+
2324## Setup
2425
2526If you want to use storyboards, just drop a UIView into your storyboard and set its class to `GMStepper`. Then customize through the attributes inspector. Otherwise, you can write the code to initialize with frame and set the properties.
@@ -27,7 +28,7 @@ If you want to use storyboards, just drop a UIView into your storyboard and set
2728## Properties
2829```swift
2930/// Current value of the stepper. Defaults to 0.
30−var value: Double = 0
31+var value: Double = 0
3132
3233/// Minimum value. Must be less than maximumValue. Defaults to 0.
3334var minimumValue: Double = 0
@@ -43,7 +44,7 @@ var autorepeat: Bool = true
4344
4445/// If the value is integer, it is shown without floating point.
4546var showIntegerIfDoubleIsInteger: Bool = true
46−
47+
4748/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
4849var leftButtonText: String = "-"
4950
@@ -68,20 +69,30 @@ var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alph
6869/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
6970var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
7071
72+/// Corner radius of the middle label's layer. Defaults to 0.0.
73+var labelCornerRadius: CGFloat = 0.0
74+
7175/// Corner radius of the stepper's layer. Defaults to 4.0.
7276var cornerRadius: CGFloat = 4.0
7377
78+/// Border width of the stepper and middle label's layer. Defaults to 0.0.
79+var borderWidth: CGFloat = 0.0
80+
81+/// Color of the border of the stepper and middle label's layer. Defaults to clear color.
82+var borderColor: UIColor = UIColor.clearColor()
83+
7484/// 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.
75−var labelWidthWeight: CGFloat = 0.5
85+var labelWidthWeight: CGFloat = 0.5
7686
7787/// Color of the flashing animation on the buttons in case the value hit the limit.
7888var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
7989```
8090
8191
82−## Author
92+## Authors
8393
84−Günay Mert Karadoğan, mertkaradogan@gmail.com
94+* [Brent Whitman](https://github.com/bwhtmn) - Maintainer
95+* [Günay Mert Karadoğan](https://github.com/gmertk) - Creator
8596
8697## License
8798