on bc19953 help sign in
.gitignore−2
since splitsnapshots
unifiedsplit
@@ -31,5 +31,3 @@ DerivedData
31# Carthage/Checkouts
31# Carthage/Checkouts
32
32
33Carthage/Build
33Carthage/Build
34−
35−.DS_Store
.swift-versiondeleted−1
@@ -1 +0,0 @@
1−4.0
GMStepper.podspec+2−2
@@ -1,9 +1,9 @@
1Pod::Spec.new do |s|
1Pod::Spec.new do |s|
2 s.name = "GMStepper"
2 s.name = "GMStepper"
3− s.version = "2.1"
3+ s.version = "1.1.0"
4 s.summary = "A stepper with a sliding label in the middle."
4 s.summary = "A stepper with a sliding label in the middle."
5 s.homepage = "https://github.com/gmertk/GMStepper"
5 s.homepage = "https://github.com/gmertk/GMStepper"
6− s.screenshots = "https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif"
6+ s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"
7 s.license = 'MIT'
7 s.license = 'MIT'
8 s.author = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com" }
8 s.author = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com" }
9 s.source = { :git => "https://github.com/gmertk/GMStepper.git", :tag => s.version.to_s }
9 s.source = { :git => "https://github.com/gmertk/GMStepper.git", :tag => s.version.to_s }
GMStepper/GMStepper.swift+78−121
@@ -11,79 +11,72 @@ import UIKit
11@IBDesignable public class GMStepper: UIControl {
11@IBDesignable public class GMStepper: UIControl {
12
12
13 /// Current value of the stepper. Defaults to 0.
13 /// Current value of the stepper. Defaults to 0.
14− @objc @IBInspectable public var value: Double = 0 {
14+ @IBInspectable public var value: Double = 0 {
15 didSet {
15 didSet {
16 value = min(maximumValue, max(minimumValue, value))
16 value = min(maximumValue, max(minimumValue, value))
17
17
18 let isInteger = floor(value) == value
18 let isInteger = floor(value) == value
19−
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 {
20+ if showIntegerIfDoubleIsInteger && isInteger {
28 label.text = String(stringInterpolationSegment: Int(value))
21 label.text = String(stringInterpolationSegment: Int(value))
29 } else {
22 } else {
30 label.text = String(stringInterpolationSegment: value)
23 label.text = String(stringInterpolationSegment: value)
31 }
24 }
32
25
33 if oldValue != value {
26 if oldValue != value {
34− sendActions(for: .valueChanged)
27+ sendActionsForControlEvents(.ValueChanged)
35 }
28 }
36 }
29 }
37 }
30 }
38
31
39 /// Minimum value. Must be less than maximumValue. Defaults to 0.
32 /// Minimum value. Must be less than maximumValue. Defaults to 0.
40− @objc @IBInspectable public var minimumValue: Double = 0 {
33+ @IBInspectable public var minimumValue: Double = 0 {
41 didSet {
34 didSet {
42 value = min(maximumValue, max(minimumValue, value))
35 value = min(maximumValue, max(minimumValue, value))
43 }
36 }
44 }
37 }
45
38
46 /// Maximum value. Must be more than minimumValue. Defaults to 100.
39 /// Maximum value. Must be more than minimumValue. Defaults to 100.
47− @objc @IBInspectable public var maximumValue: Double = 100 {
40+ @IBInspectable public var maximumValue: Double = 100 {
48 didSet {
41 didSet {
49 value = min(maximumValue, max(minimumValue, value))
42 value = min(maximumValue, max(minimumValue, value))
50 }
43 }
51 }
44 }
52
45
53 /// Step/Increment value as in UIStepper. Defaults to 1.
46 /// Step/Increment value as in UIStepper. Defaults to 1.
54− @objc @IBInspectable public var stepValue: Double = 1
47+ @IBInspectable public var stepValue: Double = 1
55
48
56 /// The same as UIStepper's autorepeat. If true, holding on the buttons or keeping the pan gesture alters the value repeatedly. Defaults to true.
49 /// The same as UIStepper's autorepeat. If true, holding on the buttons or keeping the pan gesture alters the value repeatedly. Defaults to true.
57− @objc @IBInspectable public var autorepeat: Bool = true
50+ @IBInspectable public var autorepeat: Bool = true
58
51
59 /// If the value is integer, it is shown without floating point.
52 /// If the value is integer, it is shown without floating point.
60− @objc @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
53+ @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
61
54
62 /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
55 /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
63− @objc @IBInspectable public var leftButtonText: String = "−" {
56+ @IBInspectable public var leftButtonText: String = "−" {
64 didSet {
57 didSet {
65− leftButton.setTitle(leftButtonText, for: .normal)
58+ leftButton.setTitle(leftButtonText, forState: .Normal)
66 }
59 }
67 }
60 }
68
61
69 /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
62 /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
70− @objc @IBInspectable public var rightButtonText: String = "+" {
63+ @IBInspectable public var rightButtonText: String = "+" {
71 didSet {
64 didSet {
72− rightButton.setTitle(rightButtonText, for: .normal)
65+ rightButton.setTitle(rightButtonText, forState: .Normal)
73 }
66 }
74 }
67 }
75
68
76 /// Text color of the buttons. Defaults to white.
69 /// Text color of the buttons. Defaults to white.
77− @objc @IBInspectable public var buttonsTextColor: UIColor = UIColor.white {
70+ @IBInspectable public var buttonsTextColor: UIColor = UIColor.whiteColor() {
78 didSet {
71 didSet {
79 for button in [leftButton, rightButton] {
72 for button in [leftButton, rightButton] {
80− button.setTitleColor(buttonsTextColor, for: .normal)
73+ button.setTitleColor(buttonsTextColor, forState: .Normal)
81 }
74 }
82 }
75 }
83 }
76 }
84
77
85 /// Background color of the buttons. Defaults to dark blue.
78 /// Background color of the buttons. Defaults to dark blue.
86− @objc @IBInspectable public var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1) {
79+ @IBInspectable public var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1) {
87 didSet {
80 didSet {
88 for button in [leftButton, rightButton] {
81 for button in [leftButton, rightButton] {
89 button.backgroundColor = buttonsBackgroundColor
82 button.backgroundColor = buttonsBackgroundColor
@@ -93,7 +86,7 @@ import UIKit
93 }
86 }
94
87
95 /// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
88 /// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
96− @objc public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
89+ public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
97 didSet {
90 didSet {
98 for button in [leftButton, rightButton] {
91 for button in [leftButton, rightButton] {
99 button.titleLabel?.font = buttonsFont
92 button.titleLabel?.font = buttonsFont
@@ -102,35 +95,28 @@ import UIKit
102 }
95 }
103
96
104 /// Text color of the middle label. Defaults to white.
97 /// Text color of the middle label. Defaults to white.
105− @objc @IBInspectable public var labelTextColor: UIColor = UIColor.white {
98+ @IBInspectable public var labelTextColor: UIColor = UIColor.whiteColor() {
106 didSet {
99 didSet {
107 label.textColor = labelTextColor
100 label.textColor = labelTextColor
108 }
101 }
109 }
102 }
110
103
111 /// Text color of the middle label. Defaults to lighter blue.
104 /// Text color of the middle label. Defaults to lighter blue.
112− @objc @IBInspectable public var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1) {
105+ @IBInspectable public var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1) {
113 didSet {
106 didSet {
114 label.backgroundColor = labelBackgroundColor
107 label.backgroundColor = labelBackgroundColor
115 }
108 }
116 }
109 }
117
110
118 /// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
111 /// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
119− @objc public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
112+ public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
120 didSet {
113 didSet {
121 label.font = labelFont
114 label.font = labelFont
122 }
115 }
123 }
116 }
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− }
131
117
132 /// Corner radius of the stepper's layer. Defaults to 4.0.
118 /// Corner radius of the stepper's layer. Defaults to 4.0.
133− @objc @IBInspectable public var cornerRadius: CGFloat = 4.0 {
119+ @IBInspectable public var cornerRadius: CGFloat = 4.0 {
134 didSet {
120 didSet {
135 layer.cornerRadius = cornerRadius
121 layer.cornerRadius = cornerRadius
136 clipsToBounds = true
122 clipsToBounds = true
@@ -138,7 +124,7 @@ import UIKit
138 }
124 }
139
125
140 /// Border width of the stepper and middle label's layer. Defaults to 0.0.
126 /// Border width of the stepper and middle label's layer. Defaults to 0.0.
141− @objc @IBInspectable public var borderWidth: CGFloat = 0.0 {
127+ @IBInspectable public var borderWidth: CGFloat = 0.0 {
142 didSet {
128 didSet {
143 layer.borderWidth = borderWidth
129 layer.borderWidth = borderWidth
144 label.layer.borderWidth = borderWidth
130 label.layer.borderWidth = borderWidth
@@ -146,15 +132,15 @@ import UIKit
146 }
132 }
147
133
148 /// Color of the border of the stepper and middle label's layer. Defaults to clear color.
134 /// 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 {
135+ @IBInspectable public var borderColor: UIColor = UIColor.clearColor() {
150 didSet {
136 didSet {
151− layer.borderColor = borderColor.cgColor
137+ layer.borderColor = borderColor.CGColor
152− label.layer.borderColor = borderColor.cgColor
138+ label.layer.borderColor = borderColor.CGColor
153 }
139 }
154 }
140 }
155
141
156 /// 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.
142 /// 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.
157− @objc @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
143+ @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
158 didSet {
144 didSet {
159 labelWidthWeight = min(1, max(0, labelWidthWeight))
145 labelWidthWeight = min(1, max(0, labelWidthWeight))
160 setNeedsLayout()
146 setNeedsLayout()
@@ -162,7 +148,7 @@ import UIKit
162 }
148 }
163
149
164 /// Color of the flashing animation on the buttons in case the value hit the limit.
150 /// Color of the flashing animation on the buttons in case the value hit the limit.
165− @objc @IBInspectable public var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
151+ @IBInspectable public var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
166
152
167 /**
153 /**
168 Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
154 Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
@@ -170,40 +156,38 @@ import UIKit
170 let labelSlideLength: CGFloat = 5
156 let labelSlideLength: CGFloat = 5
171
157
172 /// Duration of the sliding animation
158 /// Duration of the sliding animation
173− let labelSlideDuration = TimeInterval(0.1)
159+ let labelSlideDuration = NSTimeInterval(0.1)
174
160
175 /// Duration of the animation when the value hits the limit.
161 /// Duration of the animation when the value hits the limit.
176− let limitHitAnimationDuration = TimeInterval(0.1)
162+ let limitHitAnimationDuration = NSTimeInterval(0.1)
177
163
178 lazy var leftButton: UIButton = {
164 lazy var leftButton: UIButton = {
179 let button = UIButton()
165 let button = UIButton()
180− button.setTitle(self.leftButtonText, for: .normal)
166+ button.setTitle(self.leftButtonText, forState: .Normal)
181− button.setTitleColor(self.buttonsTextColor, for: .normal)
167+ button.setTitleColor(self.buttonsTextColor, forState: .Normal)
182 button.backgroundColor = self.buttonsBackgroundColor
168 button.backgroundColor = self.buttonsBackgroundColor
183 button.titleLabel?.font = self.buttonsFont
169 button.titleLabel?.font = self.buttonsFont
184− button.addTarget(self, action: #selector(GMStepper.leftButtonTouchDown), for: .touchDown)
170+ button.addTarget(self, action: "leftButtonTouchDown:", forControlEvents: .TouchDown)
185− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
171+ button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpInside)
186− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
172+ button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpOutside)
187− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
188 return button
173 return button
189 }()
174 }()
190
175
191 lazy var rightButton: UIButton = {
176 lazy var rightButton: UIButton = {
192 let button = UIButton()
177 let button = UIButton()
193− button.setTitle(self.rightButtonText, for: .normal)
178+ button.setTitle(self.rightButtonText, forState: .Normal)
194− button.setTitleColor(self.buttonsTextColor, for: .normal)
179+ button.setTitleColor(self.buttonsTextColor, forState: .Normal)
195 button.backgroundColor = self.buttonsBackgroundColor
180 button.backgroundColor = self.buttonsBackgroundColor
196 button.titleLabel?.font = self.buttonsFont
181 button.titleLabel?.font = self.buttonsFont
197− button.addTarget(self, action: #selector(GMStepper.rightButtonTouchDown), for: .touchDown)
182+ button.addTarget(self, action: "rightButtonTouchDown:", forControlEvents: .TouchDown)
198− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
183+ button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpInside)
199− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
184+ button.addTarget(self, action: "buttonTouchUp:", forControlEvents: UIControlEvents.TouchUpOutside)
200− button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
201 return button
185 return button
202 }()
186 }()
203
187
204 lazy var label: UILabel = {
188 lazy var label: UILabel = {
205 let label = UILabel()
189 let label = UILabel()
206− label.textAlignment = .center
190+ label.textAlignment = .Center
207 if self.showIntegerIfDoubleIsInteger && floor(self.value) == self.value {
191 if self.showIntegerIfDoubleIsInteger && floor(self.value) == self.value {
208 label.text = String(stringInterpolationSegment: Int(self.value))
192 label.text = String(stringInterpolationSegment: Int(self.value))
209 } else {
193 } else {
@@ -212,10 +196,8 @@ import UIKit
212 label.textColor = self.labelTextColor
196 label.textColor = self.labelTextColor
213 label.backgroundColor = self.labelBackgroundColor
197 label.backgroundColor = self.labelBackgroundColor
214 label.font = self.labelFont
198 label.font = self.labelFont
215− label.layer.cornerRadius = self.labelCornerRadius
199+ label.userInteractionEnabled = true
216− label.layer.masksToBounds = true
217− label.isUserInteractionEnabled = true
218− let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
200+ let panRecognizer = UIPanGestureRecognizer(target: self, action: "handlePan:")
219 panRecognizer.maximumNumberOfTouches = 1
201 panRecognizer.maximumNumberOfTouches = 1
220 label.addGestureRecognizer(panRecognizer)
202 label.addGestureRecognizer(panRecognizer)
221 return label
203 return label
@@ -243,33 +225,9 @@ import UIKit
243 }
225 }
244 }
226 }
245 }
227 }
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− }
270
228
271 /// Timer used for autorepeat option
229 /// Timer used for autorepeat option
272− var timer: Timer?
230+ var timer: NSTimer?
273
231
274 /** When UIStepper reaches its top speed, it alters the value with a time interval of ~0.05 sec.
232 /** When UIStepper reaches its top speed, it alters the value with a time interval of ~0.05 sec.
275 The user pressing and holding on the stepper repeatedly:
233 The user pressing and holding on the stepper repeatedly:
@@ -277,7 +235,7 @@ import UIKit
277 - For the next 1.5 sec, it changes the value every 0.1 sec.
235 - For the next 1.5 sec, it changes the value every 0.1 sec.
278 - Then, every 0.05 sec.
236 - Then, every 0.05 sec.
279 */
237 */
280− let timerInterval = TimeInterval(0.05)
238+ let timerInterval = NSTimeInterval(0.05)
281
239
282 /// 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.
240 /// 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.
283 var timerFireCount = 0
241 var timerFireCount = 0
@@ -291,12 +249,12 @@ import UIKit
291 }
249 }
292 }
250 }
293
251
294− @objc required public init?(coder aDecoder: NSCoder) {
252+ required public init?(coder aDecoder: NSCoder) {
295 super.init(coder: aDecoder)
253 super.init(coder: aDecoder)
296 setup()
254 setup()
297 }
255 }
298
256
299− @objc public override init(frame: CGRect) {
257+ public override init(frame: CGRect) {
300 super.init(frame: frame)
258 super.init(frame: frame)
301 setup()
259 setup()
302 }
260 }
@@ -309,9 +267,8 @@ import UIKit
309 backgroundColor = buttonsBackgroundColor
267 backgroundColor = buttonsBackgroundColor
310 layer.cornerRadius = cornerRadius
268 layer.cornerRadius = cornerRadius
311 clipsToBounds = true
269 clipsToBounds = true
312− labelOriginalCenter = label.center
313
270
314− NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
271+ NSNotificationCenter.defaultCenter().addObserver(self, selector: "reset", name: UIApplicationWillResignActiveNotification, object: nil)
315 }
272 }
316
273
317 public override func layoutSubviews() {
274 public override func layoutSubviews() {
@@ -337,7 +294,7 @@ import UIKit
337
294
338 deinit {
295 deinit {
339 resetTimer()
296 resetTimer()
340− NotificationCenter.default.removeObserver(self)
297+ NSNotificationCenter.defaultCenter().removeObserver(self)
341 }
298 }
342
299
343 /// 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.
300 /// 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.
@@ -356,17 +313,17 @@ import UIKit
356
313
357// MARK: Pan Gesture
314// MARK: Pan Gesture
358extension GMStepper {
315extension GMStepper {
359− @objc func handlePan(gesture: UIPanGestureRecognizer) {
316+ func handlePan(gesture: UIPanGestureRecognizer) {
360 switch gesture.state {
317 switch gesture.state {
361− case .began:
318+ case .Began:
362− leftButton.isEnabled = false
319+ leftButton.enabled = false
363− rightButton.isEnabled = false
320+ rightButton.enabled = false
364− case .changed:
321+ case .Changed:
365− let translation = gesture.translation(in: label)
322+ let translation = gesture.translationInView(label)
366− gesture.setTranslation(CGPoint.zero, in: label)
323+ gesture.setTranslation(CGPointZero, inView: label)
367
324
368− let slidingRight = gesture.velocity(in: label).x > 0
325+ let slidingRight = gesture.velocityInView(label).x > 0
369− let slidingLeft = gesture.velocity(in: label).x < 0
326+ let slidingLeft = gesture.velocityInView(label).x < 0
370
327
371 // Move the label with pan
328 // Move the label with pan
372 if slidingRight {
329 if slidingRight {
@@ -399,23 +356,23 @@ extension GMStepper {
399 self.rightButton.backgroundColor = self.buttonsBackgroundColor
356 self.rightButton.backgroundColor = self.buttonsBackgroundColor
400 self.leftButton.backgroundColor = self.buttonsBackgroundColor
357 self.leftButton.backgroundColor = self.buttonsBackgroundColor
401 }
358 }
402− case .ended, .cancelled, .failed:
359+ case .Ended, .Cancelled, .Failed:
403 reset()
360 reset()
404 default:
361 default:
405 break
362 break
406 }
363 }
407 }
364 }
408
365
409− @objc func reset() {
366+ func reset() {
410 panState = .Stable
367 panState = .Stable
411 stepperState = .Stable
368 stepperState = .Stable
412 resetTimer()
369 resetTimer()
413
370
414− leftButton.isEnabled = true
371+ leftButton.enabled = true
415− rightButton.isEnabled = true
372+ rightButton.enabled = true
416− label.isUserInteractionEnabled = true
373+ label.userInteractionEnabled = true
417
374
418− UIView.animate(withDuration: self.labelSlideDuration, animations: {
375+ UIView.animateWithDuration(self.labelSlideDuration, animations: {
419 self.label.center = self.labelOriginalCenter
376 self.label.center = self.labelOriginalCenter
420 self.rightButton.backgroundColor = self.buttonsBackgroundColor
377 self.rightButton.backgroundColor = self.buttonsBackgroundColor
421 self.leftButton.backgroundColor = self.buttonsBackgroundColor
378 self.leftButton.backgroundColor = self.buttonsBackgroundColor
@@ -425,9 +382,9 @@ extension GMStepper {
425
382
426// MARK: Button Events
383// MARK: Button Events
427extension GMStepper {
384extension GMStepper {
428− @objc func leftButtonTouchDown(button: UIButton) {
385+ func leftButtonTouchDown(button: UIButton) {
429− rightButton.isEnabled = false
386+ rightButton.enabled = false
430− label.isUserInteractionEnabled = false
387+ label.userInteractionEnabled = false
431 resetTimer()
388 resetTimer()
432
389
433 if value == minimumValue {
390 if value == minimumValue {
@@ -439,9 +396,9 @@ extension GMStepper {
439
396
440 }
397 }
441
398
442− @objc func rightButtonTouchDown(button: UIButton) {
399+ func rightButtonTouchDown(button: UIButton) {
443− leftButton.isEnabled = false
400+ leftButton.enabled = false
444− label.isUserInteractionEnabled = false
401+ label.userInteractionEnabled = false
445 resetTimer()
402 resetTimer()
446
403
447 if value == maximumValue {
404 if value == maximumValue {
@@ -452,7 +409,7 @@ extension GMStepper {
452 }
409 }
453 }
410 }
454
411
455− @objc func buttonTouchUp(button: UIButton) {
412+ func buttonTouchUp(button: UIButton) {
456 reset()
413 reset()
457 }
414 }
458}
415}
@@ -461,20 +418,20 @@ extension GMStepper {
461extension GMStepper {
418extension GMStepper {
462
419
463 func animateSlideLeft() {
420 func animateSlideLeft() {
464− UIView.animate(withDuration: labelSlideDuration) {
421+ UIView.animateWithDuration(labelSlideDuration) {
465 self.label.center.x -= self.labelSlideLength
422 self.label.center.x -= self.labelSlideLength
466 }
423 }
467 }
424 }
468
425
469 func animateSlideRight() {
426 func animateSlideRight() {
470− UIView.animate(withDuration: labelSlideDuration) {
427+ UIView.animateWithDuration(labelSlideDuration) {
471 self.label.center.x += self.labelSlideLength
428 self.label.center.x += self.labelSlideLength
472 }
429 }
473 }
430 }
474
431
475 func animateToOriginalPosition() {
432 func animateToOriginalPosition() {
476 if self.label.center != self.labelOriginalCenter {
433 if self.label.center != self.labelOriginalCenter {
477− UIView.animate(withDuration: labelSlideDuration) {
434+ UIView.animateWithDuration(labelSlideDuration) {
478 self.label.center = self.labelOriginalCenter
435 self.label.center = self.labelOriginalCenter
479 }
436 }
480 }
437 }
@@ -482,14 +439,14 @@ extension GMStepper {
482
439
483 func animateLimitHitIfNeeded() {
440 func animateLimitHitIfNeeded() {
484 if value == minimumValue {
441 if value == minimumValue {
485− animateLimitHitForButton(button: leftButton)
442+ animateLimitHitForButton(leftButton)
486 } else if value == maximumValue {
443 } else if value == maximumValue {
487− animateLimitHitForButton(button: rightButton)
444+ animateLimitHitForButton(rightButton)
488 }
445 }
489 }
446 }
490
447
491 func animateLimitHitForButton(button: UIButton){
448 func animateLimitHitForButton(button: UIButton){
492− UIView.animate(withDuration: limitHitAnimationDuration) {
449+ UIView.animateWithDuration(limitHitAnimationDuration) {
493 button.backgroundColor = self.limitHitAnimationColor
450 button.backgroundColor = self.limitHitAnimationColor
494 }
451 }
495 }
452 }
@@ -497,7 +454,7 @@ extension GMStepper {
497
454
498// MARK: Timer
455// MARK: Timer
499extension GMStepper {
456extension GMStepper {
500− @objc func handleTimerFire(timer: Timer) {
457+ func handleTimerFire(timer: NSTimer) {
501 timerFireCount += 1
458 timerFireCount += 1
502
459
503 if timerFireCount % timerFireCountModulo == 0 {
460 if timerFireCount % timerFireCountModulo == 0 {
@@ -506,7 +463,7 @@ extension GMStepper {
506 }
463 }
507
464
508 func scheduleTimer() {
465 func scheduleTimer() {
509− timer = Timer.scheduledTimer(timeInterval: timerInterval, target: self, selector: #selector(GMStepper.handleTimerFire), userInfo: nil, repeats: true)
466+ timer = NSTimer.scheduledTimerWithTimeInterval(timerInterval, target: self, selector: "handleTimerFire:", userInfo: nil, repeats: true)
510 }
467 }
511
468
512 func resetTimer() {
469 func resetTimer() {
GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj+111−132
@@ -7,18 +7,18 @@
7 objects = {
7 objects = {
8
8
9/* Begin PBXBuildFile section */
9/* Begin PBXBuildFile section */
10− 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3116C0DA1DA4DD360015AC69 /* GMStepperExampleTests.swift */; };
11− 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
10+ 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
12 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
11 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
13 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
12 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
14 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
13 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
15 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
14 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
16 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */; };
15 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */; };
16+ 319C194E1B4843EB005EFEE5 /* GMStepperExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C194D1B4843EB005EFEE5 /* GMStepperExampleTests.swift */; };
17 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
17 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
18/* End PBXBuildFile section */
18/* End PBXBuildFile section */
19
19
20/* Begin PBXContainerItemProxy section */
20/* Begin PBXContainerItemProxy section */
21− 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */ = {
21+ 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */ = {
22 isa = PBXContainerItemProxy;
22 isa = PBXContainerItemProxy;
23 containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
23 containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
24 proxyType = 1;
24 proxyType = 1;
@@ -28,9 +28,6 @@
28/* End PBXContainerItemProxy section */
28/* End PBXContainerItemProxy section */
29
29
30/* Begin PBXFileReference section */
30/* 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>"; };
34 319C19321B4843EB005EFEE5 /* GMStepperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
31 319C19321B4843EB005EFEE5 /* GMStepperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
35 319C19361B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32 319C19361B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
36 319C19371B4843EB005EFEE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33 319C19371B4843EB005EFEE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -38,18 +35,21 @@
38 319C193C1B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
35 319C193C1B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
39 319C193E1B4843EB005EFEE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
36 319C193E1B4843EB005EFEE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
40 319C19411B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
37 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>"; };
41 319C195B1B48445E005EFEE5 /* GMStepper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GMStepper.swift; sourceTree = "<group>"; };
41 319C195B1B48445E005EFEE5 /* GMStepper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GMStepper.swift; sourceTree = "<group>"; };
42/* End PBXFileReference section */
42/* End PBXFileReference section */
43
43
44/* Begin PBXFrameworksBuildPhase section */
44/* Begin PBXFrameworksBuildPhase section */
45− 3116C0D51DA4DD360015AC69 /* Frameworks */ = {
45+ 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
46 isa = PBXFrameworksBuildPhase;
46 isa = PBXFrameworksBuildPhase;
47 buildActionMask = 2147483647;
47 buildActionMask = 2147483647;
48 files = (
48 files = (
49 );
49 );
50 runOnlyForDeploymentPostprocessing = 0;
50 runOnlyForDeploymentPostprocessing = 0;
51 };
51 };
52− 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
52+ 319C19441B4843EB005EFEE5 /* Frameworks */ = {
53 isa = PBXFrameworksBuildPhase;
53 isa = PBXFrameworksBuildPhase;
54 buildActionMask = 2147483647;
54 buildActionMask = 2147483647;
55 files = (
55 files = (
@@ -59,21 +59,12 @@
59/* End PBXFrameworksBuildPhase section */
59/* End PBXFrameworksBuildPhase section */
60
60
61/* Begin PBXGroup section */
61/* 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− };
71 319C19291B4843EB005EFEE5 = {
62 319C19291B4843EB005EFEE5 = {
72 isa = PBXGroup;
63 isa = PBXGroup;
73 children = (
64 children = (
74 319C195A1B48445E005EFEE5 /* GMStepper */,
65 319C195A1B48445E005EFEE5 /* GMStepper */,
75 319C19341B4843EB005EFEE5 /* GMStepperExample */,
66 319C19341B4843EB005EFEE5 /* GMStepperExample */,
76− 3116C0D91DA4DD360015AC69 /* GMStepperExampleTests */,
67+ 319C194A1B4843EB005EFEE5 /* GMStepperExampleTests */,
77 319C19331B4843EB005EFEE5 /* Products */,
68 319C19331B4843EB005EFEE5 /* Products */,
78 );
69 );
79 sourceTree = "<group>";
70 sourceTree = "<group>";
@@ -82,7 +73,7 @@
82 isa = PBXGroup;
73 isa = PBXGroup;
83 children = (
74 children = (
84 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
75 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
85− 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */,
76+ 319C19471B4843EB005EFEE5 /* GMStepperExampleTests.xctest */,
86 );
77 );
87 name = Products;
78 name = Products;
88 sourceTree = "<group>";
79 sourceTree = "<group>";
@@ -108,6 +99,23 @@
108 name = "Supporting Files";
99 name = "Supporting Files";
109 sourceTree = "<group>";
100 sourceTree = "<group>";
110 };
101 };
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+ };
111 319C195A1B48445E005EFEE5 /* GMStepper */ = {
119 319C195A1B48445E005EFEE5 /* GMStepper */ = {
112 isa = PBXGroup;
120 isa = PBXGroup;
113 children = (
121 children = (
@@ -120,24 +128,6 @@
120/* End PBXGroup section */
128/* End PBXGroup section */
121
129
122/* Begin PBXNativeTarget section */
130/* 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− };
141 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
131 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
142 isa = PBXNativeTarget;
132 isa = PBXNativeTarget;
143 buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
133 buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
@@ -155,6 +145,24 @@
155 productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
145 productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
156 productType = "com.apple.product-type.application";
146 productType = "com.apple.product-type.application";
157 };
147 };
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+ };
158/* End PBXNativeTarget section */
166/* End PBXNativeTarget section */
159
167
160/* Begin PBXProject section */
168/* Begin PBXProject section */
@@ -162,20 +170,16 @@
162 isa = PBXProject;
170 isa = PBXProject;
163 attributes = {
171 attributes = {
164 LastSwiftMigration = 0700;
172 LastSwiftMigration = 0700;
165− LastSwiftUpdateCheck = 0800;
173+ LastSwiftUpdateCheck = 0700;
166− LastUpgradeCheck = 0900;
174+ LastUpgradeCheck = 0700;
167 ORGANIZATIONNAME = "Gunay Mert Karadogan";
175 ORGANIZATIONNAME = "Gunay Mert Karadogan";
168 TargetAttributes = {
176 TargetAttributes = {
169− 3116C0D71DA4DD360015AC69 = {
170− CreatedOnToolsVersion = 8.0;
171− LastSwiftMigration = 0900;
172− ProvisioningStyle = Automatic;
173− TestTargetID = 319C19311B4843EB005EFEE5;
174− };
175 319C19311B4843EB005EFEE5 = {
177 319C19311B4843EB005EFEE5 = {
176 CreatedOnToolsVersion = 6.4;
178 CreatedOnToolsVersion = 6.4;
177− DevelopmentTeam = 289M6XEDV4;
179+ };
178− LastSwiftMigration = 0900;
180+ 319C19461B4843EB005EFEE5 = {
181+ CreatedOnToolsVersion = 6.4;
182+ TestTargetID = 319C19311B4843EB005EFEE5;
179 };
183 };
180 };
184 };
181 };
185 };
@@ -193,58 +197,58 @@
193 projectRoot = "";
197 projectRoot = "";
194 targets = (
198 targets = (
195 319C19311B4843EB005EFEE5 /* GMStepperExample */,
199 319C19311B4843EB005EFEE5 /* GMStepperExample */,
196− 3116C0D71DA4DD360015AC69 /* GMStepperExampleTests */,
200+ 319C19461B4843EB005EFEE5 /* GMStepperExampleTests */,
197 );
201 );
198 };
202 };
199/* End PBXProject section */
203/* End PBXProject section */
200
204
201/* Begin PBXResourcesBuildPhase section */
205/* Begin PBXResourcesBuildPhase section */
202− 3116C0D61DA4DD360015AC69 /* Resources */ = {
206+ 319C19301B4843EB005EFEE5 /* Resources */ = {
203 isa = PBXResourcesBuildPhase;
207 isa = PBXResourcesBuildPhase;
204 buildActionMask = 2147483647;
208 buildActionMask = 2147483647;
205 files = (
209 files = (
210+ 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
211+ 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
212+ 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
206 );
213 );
207 runOnlyForDeploymentPostprocessing = 0;
214 runOnlyForDeploymentPostprocessing = 0;
208 };
215 };
209− 319C19301B4843EB005EFEE5 /* Resources */ = {
216+ 319C19451B4843EB005EFEE5 /* Resources */ = {
210 isa = PBXResourcesBuildPhase;
217 isa = PBXResourcesBuildPhase;
211 buildActionMask = 2147483647;
218 buildActionMask = 2147483647;
212 files = (
219 files = (
213− 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
214− 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
215− 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
216 );
220 );
217 runOnlyForDeploymentPostprocessing = 0;
221 runOnlyForDeploymentPostprocessing = 0;
218 };
222 };
219/* End PBXResourcesBuildPhase section */
223/* End PBXResourcesBuildPhase section */
220
224
221/* Begin PBXSourcesBuildPhase section */
225/* Begin PBXSourcesBuildPhase section */
222− 3116C0D41DA4DD360015AC69 /* Sources */ = {
226+ 319C192E1B4843EB005EFEE5 /* Sources */ = {
223 isa = PBXSourcesBuildPhase;
227 isa = PBXSourcesBuildPhase;
224 buildActionMask = 2147483647;
228 buildActionMask = 2147483647;
225 files = (
229 files = (
226− 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */,
230+ 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
227− 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */,
231+ 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
232+ 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
228 );
233 );
229 runOnlyForDeploymentPostprocessing = 0;
234 runOnlyForDeploymentPostprocessing = 0;
230 };
235 };
231− 319C192E1B4843EB005EFEE5 /* Sources */ = {
236+ 319C19431B4843EB005EFEE5 /* Sources */ = {
232 isa = PBXSourcesBuildPhase;
237 isa = PBXSourcesBuildPhase;
233 buildActionMask = 2147483647;
238 buildActionMask = 2147483647;
234 files = (
239 files = (
235− 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
240+ 319C194E1B4843EB005EFEE5 /* GMStepperExampleTests.swift in Sources */,
236− 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
241+ 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */,
237− 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
238 );
242 );
239 runOnlyForDeploymentPostprocessing = 0;
243 runOnlyForDeploymentPostprocessing = 0;
240 };
244 };
241/* End PBXSourcesBuildPhase section */
245/* End PBXSourcesBuildPhase section */
242
246
243/* Begin PBXTargetDependency section */
247/* Begin PBXTargetDependency section */
244− 3116C0DE1DA4DD360015AC69 /* PBXTargetDependency */ = {
248+ 319C19491B4843EB005EFEE5 /* PBXTargetDependency */ = {
245 isa = PBXTargetDependency;
249 isa = PBXTargetDependency;
246 target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
250 target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
247− targetProxy = 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */;
251+ targetProxy = 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */;
248 };
252 };
249/* End PBXTargetDependency section */
253/* End PBXTargetDependency section */
250
254
@@ -268,44 +272,6 @@
268/* End PBXVariantGroup section */
272/* End PBXVariantGroup section */
269
273
270/* Begin XCBuildConfiguration section */
274/* 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− };
309 319C194F1B4843EB005EFEE5 /* Debug */ = {
275 319C194F1B4843EB005EFEE5 /* Debug */ = {
310 isa = XCBuildConfiguration;
276 isa = XCBuildConfiguration;
311 buildSettings = {
277 buildSettings = {
@@ -314,21 +280,13 @@
314 CLANG_CXX_LIBRARY = "libc++";
280 CLANG_CXX_LIBRARY = "libc++";
315 CLANG_ENABLE_MODULES = YES;
281 CLANG_ENABLE_MODULES = YES;
316 CLANG_ENABLE_OBJC_ARC = YES;
282 CLANG_ENABLE_OBJC_ARC = YES;
317− CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
318 CLANG_WARN_BOOL_CONVERSION = YES;
283 CLANG_WARN_BOOL_CONVERSION = YES;
319− CLANG_WARN_COMMA = YES;
320 CLANG_WARN_CONSTANT_CONVERSION = YES;
284 CLANG_WARN_CONSTANT_CONVERSION = YES;
321 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
285 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 CLANG_WARN_EMPTY_BODY = YES;
286 CLANG_WARN_EMPTY_BODY = YES;
323 CLANG_WARN_ENUM_CONVERSION = YES;
287 CLANG_WARN_ENUM_CONVERSION = YES;
324− CLANG_WARN_INFINITE_RECURSION = YES;
325 CLANG_WARN_INT_CONVERSION = YES;
288 CLANG_WARN_INT_CONVERSION = YES;
326− CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327− CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
328 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
289 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;
332 CLANG_WARN_UNREACHABLE_CODE = YES;
290 CLANG_WARN_UNREACHABLE_CODE = YES;
333 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
291 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
334 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
292 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -367,21 +325,13 @@
367 CLANG_CXX_LIBRARY = "libc++";
325 CLANG_CXX_LIBRARY = "libc++";
368 CLANG_ENABLE_MODULES = YES;
326 CLANG_ENABLE_MODULES = YES;
369 CLANG_ENABLE_OBJC_ARC = YES;
327 CLANG_ENABLE_OBJC_ARC = YES;
370− CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
371 CLANG_WARN_BOOL_CONVERSION = YES;
328 CLANG_WARN_BOOL_CONVERSION = YES;
372− CLANG_WARN_COMMA = YES;
373 CLANG_WARN_CONSTANT_CONVERSION = YES;
329 CLANG_WARN_CONSTANT_CONVERSION = YES;
374 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
330 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
375 CLANG_WARN_EMPTY_BODY = YES;
331 CLANG_WARN_EMPTY_BODY = YES;
376 CLANG_WARN_ENUM_CONVERSION = YES;
332 CLANG_WARN_ENUM_CONVERSION = YES;
377− CLANG_WARN_INFINITE_RECURSION = YES;
378 CLANG_WARN_INT_CONVERSION = YES;
333 CLANG_WARN_INT_CONVERSION = YES;
379− CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
380− CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
381 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
334 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;
385 CLANG_WARN_UNREACHABLE_CODE = YES;
335 CLANG_WARN_UNREACHABLE_CODE = YES;
386 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
336 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
387 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
337 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -400,7 +350,6 @@
400 IPHONEOS_DEPLOYMENT_TARGET = 8.4;
350 IPHONEOS_DEPLOYMENT_TARGET = 8.4;
401 MTL_ENABLE_DEBUG_INFO = NO;
351 MTL_ENABLE_DEBUG_INFO = NO;
402 SDKROOT = iphoneos;
352 SDKROOT = iphoneos;
403− SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
404 VALIDATE_PRODUCT = YES;
353 VALIDATE_PRODUCT = YES;
405 };
354 };
406 name = Release;
355 name = Release;
@@ -409,13 +358,10 @@
409 isa = XCBuildConfiguration;
358 isa = XCBuildConfiguration;
410 buildSettings = {
359 buildSettings = {
411 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
412− DEVELOPMENT_TEAM = 289M6XEDV4;
413 INFOPLIST_FILE = GMStepperExample/Info.plist;
361 INFOPLIST_FILE = GMStepperExample/Info.plist;
414 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
362 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
415 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
363 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
416 PRODUCT_NAME = "$(TARGET_NAME)";
364 PRODUCT_NAME = "$(TARGET_NAME)";
417− SWIFT_SWIFT3_OBJC_INFERENCE = Default;
418− SWIFT_VERSION = 4.0;
419 };
365 };
420 name = Debug;
366 name = Debug;
421 };
367 };
@@ -423,28 +369,52 @@
423 isa = XCBuildConfiguration;
369 isa = XCBuildConfiguration;
424 buildSettings = {
370 buildSettings = {
425 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
371 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
426− DEVELOPMENT_TEAM = 289M6XEDV4;
427 INFOPLIST_FILE = GMStepperExample/Info.plist;
372 INFOPLIST_FILE = GMStepperExample/Info.plist;
428 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
373 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
429 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
374 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
430 PRODUCT_NAME = "$(TARGET_NAME)";
375 PRODUCT_NAME = "$(TARGET_NAME)";
431− SWIFT_SWIFT3_OBJC_INFERENCE = Default;
376+ };
432− SWIFT_VERSION = 4.0;
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";
433 };
412 };
434 name = Release;
413 name = Release;
435 };
414 };
436/* End XCBuildConfiguration section */
415/* End XCBuildConfiguration section */
437
416
438/* Begin XCConfigurationList section */
417/* Begin XCConfigurationList section */
439− 3116C0DF1DA4DD360015AC69 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
440− isa = XCConfigurationList;
441− buildConfigurations = (
442− 3116C0E01DA4DD360015AC69 /* Debug */,
443− 3116C0E11DA4DD360015AC69 /* Release */,
444− );
445− defaultConfigurationIsVisible = 0;
446− defaultConfigurationName = Release;
447− };
448 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
418 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
449 isa = XCConfigurationList;
419 isa = XCConfigurationList;
450 buildConfigurations = (
420 buildConfigurations = (
@@ -463,6 +433,15 @@
463 defaultConfigurationIsVisible = 0;
433 defaultConfigurationIsVisible = 0;
464 defaultConfigurationName = Release;
434 defaultConfigurationName = Release;
465 };
435 };
436+ 319C19541B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
437+ isa = XCConfigurationList;
438+ buildConfigurations = (
439+ 319C19551B4843EB005EFEE5 /* Debug */,
440+ 319C19561B4843EB005EFEE5 /* Release */,
441+ );
442+ defaultConfigurationIsVisible = 0;
443+ defaultConfigurationName = Release;
444+ };
466/* End XCConfigurationList section */
445/* End XCConfigurationList section */
467 };
446 };
468 rootObject = 319C192A1B4843EB005EFEE5 /* Project object */;
447 rootObject = 319C192A1B4843EB005EFEE5 /* Project object */;
GMStepperExample/GMStepperExample/AppDelegate.swift+10−10
@@ -14,33 +14,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
14 var window: UIWindow?
14 var window: UIWindow?
15
15
16
16
17− func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+ func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 // Override point for customization after application launch.
18 // Override point for customization after application launch.
19 return true
19 return true
20 }
20 }
21
21
22− func applicationWillResignActive(_ application: UIApplication) {
22+ func applicationWillResignActive(application: UIApplication) {
23 // 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.
23 // 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 invalidate graphics rendering callbacks. Games should use this method to pause the game.
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.
25 }
25 }
26
26
27− func applicationDidEnterBackground(_ application: UIApplication) {
27+ func applicationDidEnterBackground(application: UIApplication) {
28 // 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.
28 // 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.
29 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 }
30 }
31
31
32− func applicationWillEnterForeground(_ application: UIApplication) {
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.
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.
34 }
34 }
35
35
36− func applicationDidBecomeActive(_ application: UIApplication) {
36+ func applicationDidBecomeActive(application: UIApplication) {
37 // 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.
37 // 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.
38 }
38 }
39
39
40− func applicationWillTerminate(_ application: UIApplication) {
40+ func applicationWillTerminate(application: UIApplication) {
41 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
41 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 }
42 }
43−
43+
44−
44+
45}
45}
46
46
GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard+34−30
@@ -1,10 +1,9 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
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">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
3 <dependencies>
3 <dependencies>
4 <deployment identifier="iOS"/>
4 <deployment identifier="iOS"/>
5− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
5+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
6 <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
6 <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
7− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8 </dependencies>
7 </dependencies>
9 <scenes>
8 <scenes>
10 <!--View Controller-->
9 <!--View Controller-->
@@ -16,11 +15,12 @@
16 <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
15 <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
17 </layoutGuides>
16 </layoutGuides>
18 <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
17 <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
19− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
18+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
20 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
19 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
21 <subviews>
20 <subviews>
22 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AU6-4C-B2F" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
21 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AU6-4C-B2F" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
22+ <rect key="frame" x="28" y="28" width="544" height="44"/>
23− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
23+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
24 <constraints>
24 <constraints>
25 <constraint firstAttribute="height" constant="44" id="6mC-hP-wFD"/>
25 <constraint firstAttribute="height" constant="44" id="6mC-hP-wFD"/>
26 </constraints>
26 </constraints>
@@ -34,26 +34,27 @@
34 </userDefinedRuntimeAttributes>
34 </userDefinedRuntimeAttributes>
35 </view>
35 </view>
36 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="if7-U5-bAM" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
36 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="if7-U5-bAM" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
37+ <rect key="frame" x="140" y="116" width="320" height="66"/>
37− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
38+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
38 <constraints>
39 <constraints>
39 <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
40 <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
40 <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
41 <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
41 </constraints>
42 </constraints>
42 <userDefinedRuntimeAttributes>
43 <userDefinedRuntimeAttributes>
43 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
44 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
44− <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
45+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="calibratedRGB"/>
45 </userDefinedRuntimeAttribute>
46 </userDefinedRuntimeAttribute>
46 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
47 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
47− <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
48+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="calibratedRGB"/>
48 </userDefinedRuntimeAttribute>
49 </userDefinedRuntimeAttribute>
49 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
50 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
50− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
51+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
51 </userDefinedRuntimeAttribute>
52 </userDefinedRuntimeAttribute>
52 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
53 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
53− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
54+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
54 </userDefinedRuntimeAttribute>
55 </userDefinedRuntimeAttribute>
55 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
56 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
56− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
57+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
57 </userDefinedRuntimeAttribute>
58 </userDefinedRuntimeAttribute>
58 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
59 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
59 <real key="value" value="0.5"/>
60 <real key="value" value="0.5"/>
@@ -61,47 +62,49 @@
61 </userDefinedRuntimeAttributes>
62 </userDefinedRuntimeAttributes>
62 </view>
63 </view>
63 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R9n-I0-fq7" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
64 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R9n-I0-fq7" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
65+ <rect key="frame" x="200" y="226" width="200" height="66"/>
64− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
66+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
65 <constraints>
67 <constraints>
66 <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
68 <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
67 <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
69 <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
68 </constraints>
70 </constraints>
69 <userDefinedRuntimeAttributes>
71 <userDefinedRuntimeAttributes>
70 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
72 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
71− <color key="value" red="0.1819814891" green="0.69426733259999995" blue="0.53024792669999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
73+ <color key="value" red="0.1819814891" green="0.69426733259999995" blue="0.53024792669999998" alpha="1" colorSpace="calibratedRGB"/>
72 </userDefinedRuntimeAttribute>
74 </userDefinedRuntimeAttribute>
73 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
75 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
74− <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
76+ <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
75 </userDefinedRuntimeAttribute>
77 </userDefinedRuntimeAttribute>
76 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
78 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
77− <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
79+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
78 </userDefinedRuntimeAttribute>
80 </userDefinedRuntimeAttribute>
79 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
81 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
80− <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
82+ <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
81 </userDefinedRuntimeAttribute>
83 </userDefinedRuntimeAttribute>
82 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
84 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
83− <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
85+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
84 </userDefinedRuntimeAttribute>
86 </userDefinedRuntimeAttribute>
85 </userDefinedRuntimeAttributes>
87 </userDefinedRuntimeAttributes>
86 </view>
88 </view>
87 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U8X-8Z-7Mo" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
89 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U8X-8Z-7Mo" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
90+ <rect key="frame" x="28" y="336" width="544" height="44"/>
88− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
91+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
89 <constraints>
92 <constraints>
90 <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
93 <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
91 <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
94 <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
92 </constraints>
95 </constraints>
93 <userDefinedRuntimeAttributes>
96 <userDefinedRuntimeAttributes>
94 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
97 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
95− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
98+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
96 </userDefinedRuntimeAttribute>
99 </userDefinedRuntimeAttribute>
97 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
100 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
98− <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
101+ <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
99 </userDefinedRuntimeAttribute>
102 </userDefinedRuntimeAttribute>
100 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
103 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
101− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
104+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
102 </userDefinedRuntimeAttribute>
105 </userDefinedRuntimeAttribute>
103 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
106 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
104− <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
107+ <color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
105 </userDefinedRuntimeAttribute>
108 </userDefinedRuntimeAttribute>
106 <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
109 <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
107 <real key="value" value="0.69999999999999996"/>
110 <real key="value" value="0.69999999999999996"/>
@@ -112,7 +115,7 @@
112 <integer key="value" value="0"/>
115 <integer key="value" value="0"/>
113 </userDefinedRuntimeAttribute>
116 </userDefinedRuntimeAttribute>
114 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
117 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
115− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
118+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
116 </userDefinedRuntimeAttribute>
119 </userDefinedRuntimeAttribute>
117 <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
120 <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
118 <integer key="value" value="100"/>
121 <integer key="value" value="100"/>
@@ -125,7 +128,8 @@
125 </variation>
128 </variation>
126 </view>
129 </view>
127 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Ri-Yr-sRs" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
130 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Ri-Yr-sRs" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
131+ <rect key="frame" x="210" y="424" width="180" height="50"/>
128− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
132+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
129 <constraints>
133 <constraints>
130 <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
134 <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
131 <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
135 <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
@@ -144,24 +148,24 @@
144 <real key="value" value="4"/>
148 <real key="value" value="4"/>
145 </userDefinedRuntimeAttribute>
149 </userDefinedRuntimeAttribute>
146 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
150 <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"/>
151+ <color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
148 </userDefinedRuntimeAttribute>
152 </userDefinedRuntimeAttribute>
149 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
153 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
150− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
154+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
151 </userDefinedRuntimeAttribute>
155 </userDefinedRuntimeAttribute>
152 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
156 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
153− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
157+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
154 </userDefinedRuntimeAttribute>
158 </userDefinedRuntimeAttribute>
155 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
159 <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"/>
160+ <color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
157 </userDefinedRuntimeAttribute>
161 </userDefinedRuntimeAttribute>
158 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
162 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
159− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
163+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
160 </userDefinedRuntimeAttribute>
164 </userDefinedRuntimeAttribute>
161 </userDefinedRuntimeAttributes>
165 </userDefinedRuntimeAttributes>
162 </view>
166 </view>
163 </subviews>
167 </subviews>
164− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
168+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
165 <constraints>
169 <constraints>
166 <constraint firstItem="R9n-I0-fq7" firstAttribute="centerX" secondItem="U8X-8Z-7Mo" secondAttribute="centerX" id="3cD-WW-Qg4"/>
170 <constraint firstItem="R9n-I0-fq7" firstAttribute="centerX" secondItem="U8X-8Z-7Mo" secondAttribute="centerX" id="3cD-WW-Qg4"/>
167 <constraint firstItem="if7-U5-bAM" firstAttribute="top" secondItem="AU6-4C-B2F" secondAttribute="bottom" constant="44" id="662-W9-CUn"/>
171 <constraint firstItem="if7-U5-bAM" firstAttribute="top" secondItem="AU6-4C-B2F" secondAttribute="bottom" constant="44" id="662-W9-CUn"/>
GMStepperExample/GMStepperExample/ViewController.swift+2−2
@@ -13,10 +13,10 @@ class ViewController: UIViewController {
13 @IBOutlet weak var stepper: GMStepper!
13 @IBOutlet weak var stepper: GMStepper!
14 override func viewDidLoad() {
14 override func viewDidLoad() {
15 super.viewDidLoad()
15 super.viewDidLoad()
16− stepper.addTarget(self, action: #selector(ViewController.stepperValueChanged), for: .valueChanged)
16+ stepper.addTarget(self, action: "stepperValueChanged:", forControlEvents: .ValueChanged)
17 }
17 }
18
18
19− @objc func stepperValueChanged(stepper: GMStepper) {
19+ func stepperValueChanged(stepper: GMStepper) {
20 print(stepper.value, terminator: "")
20 print(stepper.value, terminator: "")
21 }
21 }
22}
22}
GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swift+3−3
@@ -6,8 +6,8 @@
6// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
6// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
7//
7//
8
8
9−import XCTest
10import UIKit
9import UIKit
10+import XCTest
11
11
12class GMStepperExampleTests: XCTestCase {
12class GMStepperExampleTests: XCTestCase {
13 var stepper: GMStepper!
13 var stepper: GMStepper!
@@ -37,6 +37,6 @@ class GMStepperExampleTests: XCTestCase {
37
37
38 XCTAssert(stepper.value == stepper.maximumValue, "Pass")
38 XCTAssert(stepper.value == stepper.maximumValue, "Pass")
39 }
39 }
40−
40+
41−
41+
42}
42}
GMStepperExample/GMStepperExampleTests/Info.plist+2
@@ -16,6 +16,8 @@
16 <string>BNDL</string>
16 <string>BNDL</string>
17 <key>CFBundleShortVersionString</key>
17 <key>CFBundleShortVersionString</key>
18 <string>1.0</string>
18 <string>1.0</string>
19+ <key>CFBundleSignature</key>
20+ <string>????</string>
19 <key>CFBundleVersion</key>
21 <key>CFBundleVersion</key>
20 <string>1</string>
22 <string>1</string>
21</dict>
23</dict>
README.md+6−17
@@ -5,7 +5,6 @@
5
5
6A 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/).
6A 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/).
7
7
8−
9## Screenshot
8## Screenshot
10
9
11![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
10![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
@@ -20,7 +19,7 @@ it, simply add the following lines to your Podfile:
20use_frameworks!
19use_frameworks!
21pod "GMStepper"
20pod "GMStepper"
22```
21```
23−
22+
24## Setup
23## Setup
25
24
26If 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.
25If 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.
@@ -28,7 +27,7 @@ If you want to use storyboards, just drop a UIView into your storyboard and set
28## Properties
27## Properties
29```swift
28```swift
30/// Current value of the stepper. Defaults to 0.
29/// Current value of the stepper. Defaults to 0.
31−var value: Double = 0
30+var value: Double = 0
32
31
33/// Minimum value. Must be less than maximumValue. Defaults to 0.
32/// Minimum value. Must be less than maximumValue. Defaults to 0.
34var minimumValue: Double = 0
33var minimumValue: Double = 0
@@ -44,7 +43,7 @@ var autorepeat: Bool = true
44
43
45/// If the value is integer, it is shown without floating point.
44/// If the value is integer, it is shown without floating point.
46var showIntegerIfDoubleIsInteger: Bool = true
45var showIntegerIfDoubleIsInteger: Bool = true
47−
46+
48/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
47/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
49var leftButtonText: String = "-"
48var leftButtonText: String = "-"
50
49
@@ -69,30 +68,20 @@ var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alph
69/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
68/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
70var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
69var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
71
70
72−/// Corner radius of the middle label's layer. Defaults to 0.0.
73−var labelCornerRadius: CGFloat = 0.0
74−
75/// Corner radius of the stepper's layer. Defaults to 4.0.
71/// Corner radius of the stepper's layer. Defaults to 4.0.
76var cornerRadius: CGFloat = 4.0
72var cornerRadius: CGFloat = 4.0
77
73
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−
84/// 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.
74/// 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.
85−var labelWidthWeight: CGFloat = 0.5
75+var labelWidthWeight: CGFloat = 0.5
86
76
87/// Color of the flashing animation on the buttons in case the value hit the limit.
77/// Color of the flashing animation on the buttons in case the value hit the limit.
88var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
78var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
89```
79```
90
80
91
81
92−## Authors
82+## Author
93
83
94−* [Brent Whitman](https://github.com/bwhtmn) - Maintainer
95−* [Günay Mert Karadoğan](https://github.com/gmertk) - Creator
84+Günay Mert Karadoğan, mertkaradogan@gmail.com
96
85
97## License
86## License
98
87