on master help sign in
.swift-versionnew file+1
since splitsnapshots
unifiedsplit
@@ -0,0 +1 @@
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 = "1.2.0"
3+ s.version = "2.1"
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://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"
6+ s.screenshots = "https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif"
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+40−28
@@ -11,7 +11,7 @@ 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− @IBInspectable public var value: Double = 0 {
14+ @objc @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
@@ -37,44 +37,44 @@ import UIKit
37 }
37 }
38
38
39 /// Minimum value. Must be less than maximumValue. Defaults to 0.
39 /// Minimum value. Must be less than maximumValue. Defaults to 0.
40− @IBInspectable public var minimumValue: Double = 0 {
40+ @objc @IBInspectable public var minimumValue: Double = 0 {
41 didSet {
41 didSet {
42 value = min(maximumValue, max(minimumValue, value))
42 value = min(maximumValue, max(minimumValue, value))
43 }
43 }
44 }
44 }
45
45
46 /// Maximum value. Must be more than minimumValue. Defaults to 100.
46 /// Maximum value. Must be more than minimumValue. Defaults to 100.
47− @IBInspectable public var maximumValue: Double = 100 {
47+ @objc @IBInspectable public var maximumValue: Double = 100 {
48 didSet {
48 didSet {
49 value = min(maximumValue, max(minimumValue, value))
49 value = min(maximumValue, max(minimumValue, value))
50 }
50 }
51 }
51 }
52
52
53 /// Step/Increment value as in UIStepper. Defaults to 1.
53 /// Step/Increment value as in UIStepper. Defaults to 1.
54− @IBInspectable public var stepValue: Double = 1
54+ @objc @IBInspectable public var stepValue: Double = 1
55
55
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.
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.
57− @IBInspectable public var autorepeat: Bool = true
57+ @objc @IBInspectable public var autorepeat: Bool = true
58
58
59 /// If the value is integer, it is shown without floating point.
59 /// If the value is integer, it is shown without floating point.
60− @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
60+ @objc @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
61
61
62 /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
62 /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
63− @IBInspectable public var leftButtonText: String = "−" {
63+ @objc @IBInspectable public var leftButtonText: String = "−" {
64 didSet {
64 didSet {
65 leftButton.setTitle(leftButtonText, for: .normal)
65 leftButton.setTitle(leftButtonText, for: .normal)
66 }
66 }
67 }
67 }
68
68
69 /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
69 /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
70− @IBInspectable public var rightButtonText: String = "+" {
70+ @objc @IBInspectable public var rightButtonText: String = "+" {
71 didSet {
71 didSet {
72 rightButton.setTitle(rightButtonText, for: .normal)
72 rightButton.setTitle(rightButtonText, for: .normal)
73 }
73 }
74 }
74 }
75
75
76 /// Text color of the buttons. Defaults to white.
76 /// Text color of the buttons. Defaults to white.
77− @IBInspectable public var buttonsTextColor: UIColor = UIColor.white {
77+ @objc @IBInspectable public var buttonsTextColor: UIColor = UIColor.white {
78 didSet {
78 didSet {
79 for button in [leftButton, rightButton] {
79 for button in [leftButton, rightButton] {
80 button.setTitleColor(buttonsTextColor, for: .normal)
80 button.setTitleColor(buttonsTextColor, for: .normal)
@@ -83,7 +83,7 @@ import UIKit
83 }
83 }
84
84
85 /// Background color of the buttons. Defaults to dark blue.
85 /// Background color of the buttons. Defaults to dark blue.
86− @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) {
87 didSet {
87 didSet {
88 for button in [leftButton, rightButton] {
88 for button in [leftButton, rightButton] {
89 button.backgroundColor = buttonsBackgroundColor
89 button.backgroundColor = buttonsBackgroundColor
@@ -93,7 +93,7 @@ import UIKit
93 }
93 }
94
94
95 /// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
95 /// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
96− public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
96+ @objc public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
97 didSet {
97 didSet {
98 for button in [leftButton, rightButton] {
98 for button in [leftButton, rightButton] {
99 button.titleLabel?.font = buttonsFont
99 button.titleLabel?.font = buttonsFont
@@ -102,28 +102,35 @@ import UIKit
102 }
102 }
103
103
104 /// Text color of the middle label. Defaults to white.
104 /// Text color of the middle label. Defaults to white.
105− @IBInspectable public var labelTextColor: UIColor = UIColor.white {
105+ @objc @IBInspectable public var labelTextColor: UIColor = UIColor.white {
106 didSet {
106 didSet {
107 label.textColor = labelTextColor
107 label.textColor = labelTextColor
108 }
108 }
109 }
109 }
110
110
111 /// Text color of the middle label. Defaults to lighter blue.
111 /// Text color of the middle label. Defaults to lighter blue.
112− @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) {
113 didSet {
113 didSet {
114 label.backgroundColor = labelBackgroundColor
114 label.backgroundColor = labelBackgroundColor
115 }
115 }
116 }
116 }
117
117
118 /// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
118 /// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
119− public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
119+ @objc public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
120 didSet {
120 didSet {
121 label.font = labelFont
121 label.font = labelFont
122 }
122 }
123 }
123 }
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+ }
124
131
125 /// Corner radius of the stepper's layer. Defaults to 4.0.
132 /// Corner radius of the stepper's layer. Defaults to 4.0.
126− @IBInspectable public var cornerRadius: CGFloat = 4.0 {
133+ @objc @IBInspectable public var cornerRadius: CGFloat = 4.0 {
127 didSet {
134 didSet {
128 layer.cornerRadius = cornerRadius
135 layer.cornerRadius = cornerRadius
129 clipsToBounds = true
136 clipsToBounds = true
@@ -131,7 +138,7 @@ import UIKit
131 }
138 }
132
139
133 /// Border width of the stepper and middle label's layer. Defaults to 0.0.
140 /// Border width of the stepper and middle label's layer. Defaults to 0.0.
134− @IBInspectable public var borderWidth: CGFloat = 0.0 {
141+ @objc @IBInspectable public var borderWidth: CGFloat = 0.0 {
135 didSet {
142 didSet {
136 layer.borderWidth = borderWidth
143 layer.borderWidth = borderWidth
137 label.layer.borderWidth = borderWidth
144 label.layer.borderWidth = borderWidth
@@ -139,7 +146,7 @@ import UIKit
139 }
146 }
140
147
141 /// Color of the border of the stepper and middle label's layer. Defaults to clear color.
148 /// Color of the border of the stepper and middle label's layer. Defaults to clear color.
142− @IBInspectable public var borderColor: UIColor = UIColor.clear {
149+ @objc @IBInspectable public var borderColor: UIColor = UIColor.clear {
143 didSet {
150 didSet {
144 layer.borderColor = borderColor.cgColor
151 layer.borderColor = borderColor.cgColor
145 label.layer.borderColor = borderColor.cgColor
152 label.layer.borderColor = borderColor.cgColor
@@ -147,7 +154,7 @@ import UIKit
147 }
154 }
148
155
149 /// 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.
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.
150− @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
157+ @objc @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
151 didSet {
158 didSet {
152 labelWidthWeight = min(1, max(0, labelWidthWeight))
159 labelWidthWeight = min(1, max(0, labelWidthWeight))
153 setNeedsLayout()
160 setNeedsLayout()
@@ -155,7 +162,7 @@ import UIKit
155 }
162 }
156
163
157 /// Color of the flashing animation on the buttons in case the value hit the limit.
164 /// Color of the flashing animation on the buttons in case the value hit the limit.
158− @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)
159
166
160 /**
167 /**
161 Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
168 Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
@@ -177,6 +184,7 @@ import UIKit
177 button.addTarget(self, action: #selector(GMStepper.leftButtonTouchDown), for: .touchDown)
184 button.addTarget(self, action: #selector(GMStepper.leftButtonTouchDown), for: .touchDown)
178 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
185 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
179 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
186 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
187+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
180 return button
188 return button
181 }()
189 }()
182
190
@@ -189,6 +197,7 @@ import UIKit
189 button.addTarget(self, action: #selector(GMStepper.rightButtonTouchDown), for: .touchDown)
197 button.addTarget(self, action: #selector(GMStepper.rightButtonTouchDown), for: .touchDown)
190 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
198 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
191 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
199 button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
200+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
192 return button
201 return button
193 }()
202 }()
194
203
@@ -203,6 +212,8 @@ import UIKit
203 label.textColor = self.labelTextColor
212 label.textColor = self.labelTextColor
204 label.backgroundColor = self.labelBackgroundColor
213 label.backgroundColor = self.labelBackgroundColor
205 label.font = self.labelFont
214 label.font = self.labelFont
215+ label.layer.cornerRadius = self.labelCornerRadius
216+ label.layer.masksToBounds = true
206 label.isUserInteractionEnabled = true
217 label.isUserInteractionEnabled = true
207 let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
218 let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
208 panRecognizer.maximumNumberOfTouches = 1
219 panRecognizer.maximumNumberOfTouches = 1
@@ -234,7 +245,7 @@ import UIKit
234 }
245 }
235
246
236
247
237− public var items : [String] = [] {
248+ @objc public var items : [String] = [] {
238 didSet {
249 didSet {
239 let isInteger = floor(value) == value
250 let isInteger = floor(value) == value
240
251
@@ -280,12 +291,12 @@ import UIKit
280 }
291 }
281 }
292 }
282
293
283− required public init?(coder aDecoder: NSCoder) {
294+ @objc required public init?(coder aDecoder: NSCoder) {
284 super.init(coder: aDecoder)
295 super.init(coder: aDecoder)
285 setup()
296 setup()
286 }
297 }
287
298
288− public override init(frame: CGRect) {
299+ @objc public override init(frame: CGRect) {
289 super.init(frame: frame)
300 super.init(frame: frame)
290 setup()
301 setup()
291 }
302 }
@@ -298,6 +309,7 @@ import UIKit
298 backgroundColor = buttonsBackgroundColor
309 backgroundColor = buttonsBackgroundColor
299 layer.cornerRadius = cornerRadius
310 layer.cornerRadius = cornerRadius
300 clipsToBounds = true
311 clipsToBounds = true
312+ labelOriginalCenter = label.center
301
313
302 NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
314 NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
303 }
315 }
@@ -344,7 +356,7 @@ import UIKit
344
356
345// MARK: Pan Gesture
357// MARK: Pan Gesture
346extension GMStepper {
358extension GMStepper {
347− func handlePan(gesture: UIPanGestureRecognizer) {
359+ @objc func handlePan(gesture: UIPanGestureRecognizer) {
348 switch gesture.state {
360 switch gesture.state {
349 case .began:
361 case .began:
350 leftButton.isEnabled = false
362 leftButton.isEnabled = false
@@ -394,7 +406,7 @@ extension GMStepper {
394 }
406 }
395 }
407 }
396
408
397− func reset() {
409+ @objc func reset() {
398 panState = .Stable
410 panState = .Stable
399 stepperState = .Stable
411 stepperState = .Stable
400 resetTimer()
412 resetTimer()
@@ -413,7 +425,7 @@ extension GMStepper {
413
425
414// MARK: Button Events
426// MARK: Button Events
415extension GMStepper {
427extension GMStepper {
416− func leftButtonTouchDown(button: UIButton) {
428+ @objc func leftButtonTouchDown(button: UIButton) {
417 rightButton.isEnabled = false
429 rightButton.isEnabled = false
418 label.isUserInteractionEnabled = false
430 label.isUserInteractionEnabled = false
419 resetTimer()
431 resetTimer()
@@ -427,7 +439,7 @@ extension GMStepper {
427
439
428 }
440 }
429
441
430− func rightButtonTouchDown(button: UIButton) {
442+ @objc func rightButtonTouchDown(button: UIButton) {
431 leftButton.isEnabled = false
443 leftButton.isEnabled = false
432 label.isUserInteractionEnabled = false
444 label.isUserInteractionEnabled = false
433 resetTimer()
445 resetTimer()
@@ -440,7 +452,7 @@ extension GMStepper {
440 }
452 }
441 }
453 }
442
454
443− func buttonTouchUp(button: UIButton) {
455+ @objc func buttonTouchUp(button: UIButton) {
444 reset()
456 reset()
445 }
457 }
446}
458}
@@ -485,7 +497,7 @@ extension GMStepper {
485
497
486// MARK: Timer
498// MARK: Timer
487extension GMStepper {
499extension GMStepper {
488− func handleTimerFire(timer: Timer) {
500+ @objc func handleTimerFire(timer: Timer) {
489 timerFireCount += 1
501 timerFireCount += 1
490
502
491 if timerFireCount % timerFireCountModulo == 0 {
503 if timerFireCount % timerFireCountModulo == 0 {
GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj+124−120
@@ -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 */; };
10− 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
11+ 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
11 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
12 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
12 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
13 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
13 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
14 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
14 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
15 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
15 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */; };
16 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− 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */ = {
21+ 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */ = {
22 isa = PBXContainerItemProxy;
22 isa = PBXContainerItemProxy;
23 containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
23 containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
24 proxyType = 1;
24 proxyType = 1;
@@ -28,6 +28,9 @@
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>"; };
31 319C19321B4843EB005EFEE5 /* GMStepperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 319C19321B4843EB005EFEE5 /* GMStepperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 319C19361B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
35 319C19361B4843EB005EFEE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
33 319C19371B4843EB005EFEE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
36 319C19371B4843EB005EFEE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -35,21 +38,18 @@
35 319C193C1B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
38 319C193C1B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
36 319C193E1B4843EB005EFEE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
39 319C193E1B4843EB005EFEE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
37 319C19411B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
40 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− 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
45+ 3116C0D51DA4DD360015AC69 /* 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− 319C19441B4843EB005EFEE5 /* Frameworks */ = {
52+ 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
53 isa = PBXFrameworksBuildPhase;
53 isa = PBXFrameworksBuildPhase;
54 buildActionMask = 2147483647;
54 buildActionMask = 2147483647;
55 files = (
55 files = (
@@ -59,12 +59,21 @@
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+ };
62 319C19291B4843EB005EFEE5 = {
71 319C19291B4843EB005EFEE5 = {
63 isa = PBXGroup;
72 isa = PBXGroup;
64 children = (
73 children = (
65 319C195A1B48445E005EFEE5 /* GMStepper */,
74 319C195A1B48445E005EFEE5 /* GMStepper */,
66 319C19341B4843EB005EFEE5 /* GMStepperExample */,
75 319C19341B4843EB005EFEE5 /* GMStepperExample */,
67− 319C194A1B4843EB005EFEE5 /* GMStepperExampleTests */,
76+ 3116C0D91DA4DD360015AC69 /* GMStepperExampleTests */,
68 319C19331B4843EB005EFEE5 /* Products */,
77 319C19331B4843EB005EFEE5 /* Products */,
69 );
78 );
70 sourceTree = "<group>";
79 sourceTree = "<group>";
@@ -73,7 +82,7 @@
73 isa = PBXGroup;
82 isa = PBXGroup;
74 children = (
83 children = (
75 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
84 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
76− 319C19471B4843EB005EFEE5 /* GMStepperExampleTests.xctest */,
85+ 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */,
77 );
86 );
78 name = Products;
87 name = Products;
79 sourceTree = "<group>";
88 sourceTree = "<group>";
@@ -99,23 +108,6 @@
99 name = "Supporting Files";
108 name = "Supporting Files";
100 sourceTree = "<group>";
109 sourceTree = "<group>";
101 };
110 };
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− };
119 319C195A1B48445E005EFEE5 /* GMStepper */ = {
111 319C195A1B48445E005EFEE5 /* GMStepper */ = {
120 isa = PBXGroup;
112 isa = PBXGroup;
121 children = (
113 children = (
@@ -128,6 +120,24 @@
128/* End PBXGroup section */
120/* End PBXGroup section */
129
121
130/* Begin PBXNativeTarget section */
122/* 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+ };
131 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
141 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
132 isa = PBXNativeTarget;
142 isa = PBXNativeTarget;
133 buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
143 buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
@@ -145,24 +155,6 @@
145 productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
155 productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
146 productType = "com.apple.product-type.application";
156 productType = "com.apple.product-type.application";
147 };
157 };
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− };
166/* End PBXNativeTarget section */
158/* End PBXNativeTarget section */
167
159
168/* Begin PBXProject section */
160/* Begin PBXProject section */
@@ -170,20 +162,20 @@
170 isa = PBXProject;
162 isa = PBXProject;
171 attributes = {
163 attributes = {
172 LastSwiftMigration = 0700;
164 LastSwiftMigration = 0700;
173− LastSwiftUpdateCheck = 0700;
165+ LastSwiftUpdateCheck = 0800;
174− LastUpgradeCheck = 0800;
166+ LastUpgradeCheck = 0900;
175 ORGANIZATIONNAME = "Gunay Mert Karadogan";
167 ORGANIZATIONNAME = "Gunay Mert Karadogan";
176 TargetAttributes = {
168 TargetAttributes = {
177− 319C19311B4843EB005EFEE5 = {
169+ 3116C0D71DA4DD360015AC69 = {
178− CreatedOnToolsVersion = 6.4;
170+ CreatedOnToolsVersion = 8.0;
179− DevelopmentTeam = 289M6XEDV4;
180− LastSwiftMigration = 0800;
171+ LastSwiftMigration = 0900;
172+ ProvisioningStyle = Automatic;
173+ TestTargetID = 319C19311B4843EB005EFEE5;
181 };
174 };
182− 319C19461B4843EB005EFEE5 = {
175+ 319C19311B4843EB005EFEE5 = {
183 CreatedOnToolsVersion = 6.4;
176 CreatedOnToolsVersion = 6.4;
184 DevelopmentTeam = 289M6XEDV4;
177 DevelopmentTeam = 289M6XEDV4;
185− LastSwiftMigration = 0800;
178+ LastSwiftMigration = 0900;
186− TestTargetID = 319C19311B4843EB005EFEE5;
187 };
179 };
188 };
180 };
189 };
181 };
@@ -201,58 +193,58 @@
201 projectRoot = "";
193 projectRoot = "";
202 targets = (
194 targets = (
203 319C19311B4843EB005EFEE5 /* GMStepperExample */,
195 319C19311B4843EB005EFEE5 /* GMStepperExample */,
204− 319C19461B4843EB005EFEE5 /* GMStepperExampleTests */,
196+ 3116C0D71DA4DD360015AC69 /* GMStepperExampleTests */,
205 );
197 );
206 };
198 };
207/* End PBXProject section */
199/* End PBXProject section */
208
200
209/* Begin PBXResourcesBuildPhase section */
201/* Begin PBXResourcesBuildPhase section */
210− 319C19301B4843EB005EFEE5 /* Resources */ = {
202+ 3116C0D61DA4DD360015AC69 /* Resources */ = {
211 isa = PBXResourcesBuildPhase;
203 isa = PBXResourcesBuildPhase;
212 buildActionMask = 2147483647;
204 buildActionMask = 2147483647;
213 files = (
205 files = (
214− 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
215− 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
216− 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
217 );
206 );
218 runOnlyForDeploymentPostprocessing = 0;
207 runOnlyForDeploymentPostprocessing = 0;
219 };
208 };
220− 319C19451B4843EB005EFEE5 /* Resources */ = {
209+ 319C19301B4843EB005EFEE5 /* Resources */ = {
221 isa = PBXResourcesBuildPhase;
210 isa = PBXResourcesBuildPhase;
222 buildActionMask = 2147483647;
211 buildActionMask = 2147483647;
223 files = (
212 files = (
213+ 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
214+ 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
215+ 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
224 );
216 );
225 runOnlyForDeploymentPostprocessing = 0;
217 runOnlyForDeploymentPostprocessing = 0;
226 };
218 };
227/* End PBXResourcesBuildPhase section */
219/* End PBXResourcesBuildPhase section */
228
220
229/* Begin PBXSourcesBuildPhase section */
221/* Begin PBXSourcesBuildPhase section */
230− 319C192E1B4843EB005EFEE5 /* Sources */ = {
222+ 3116C0D41DA4DD360015AC69 /* Sources */ = {
231 isa = PBXSourcesBuildPhase;
223 isa = PBXSourcesBuildPhase;
232 buildActionMask = 2147483647;
224 buildActionMask = 2147483647;
233 files = (
225 files = (
234− 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
226+ 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */,
235− 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
227+ 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */,
236− 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
237 );
228 );
238 runOnlyForDeploymentPostprocessing = 0;
229 runOnlyForDeploymentPostprocessing = 0;
239 };
230 };
240− 319C19431B4843EB005EFEE5 /* Sources */ = {
231+ 319C192E1B4843EB005EFEE5 /* Sources */ = {
241 isa = PBXSourcesBuildPhase;
232 isa = PBXSourcesBuildPhase;
242 buildActionMask = 2147483647;
233 buildActionMask = 2147483647;
243 files = (
234 files = (
244− 319C194E1B4843EB005EFEE5 /* GMStepperExampleTests.swift in Sources */,
235+ 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
245− 3169DD3E1B496C33009791D1 /* GMStepper.swift in Sources */,
236+ 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
237+ 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
246 );
238 );
247 runOnlyForDeploymentPostprocessing = 0;
239 runOnlyForDeploymentPostprocessing = 0;
248 };
240 };
249/* End PBXSourcesBuildPhase section */
241/* End PBXSourcesBuildPhase section */
250
242
251/* Begin PBXTargetDependency section */
243/* Begin PBXTargetDependency section */
252− 319C19491B4843EB005EFEE5 /* PBXTargetDependency */ = {
244+ 3116C0DE1DA4DD360015AC69 /* PBXTargetDependency */ = {
253 isa = PBXTargetDependency;
245 isa = PBXTargetDependency;
254 target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
246 target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
255− targetProxy = 319C19481B4843EB005EFEE5 /* PBXContainerItemProxy */;
247+ targetProxy = 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */;
256 };
248 };
257/* End PBXTargetDependency section */
249/* End PBXTargetDependency section */
258
250
@@ -276,6 +268,44 @@
276/* End PBXVariantGroup section */
268/* End PBXVariantGroup section */
277
269
278/* Begin XCBuildConfiguration section */
270/* 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+ };
279 319C194F1B4843EB005EFEE5 /* Debug */ = {
309 319C194F1B4843EB005EFEE5 /* Debug */ = {
280 isa = XCBuildConfiguration;
310 isa = XCBuildConfiguration;
281 buildSettings = {
311 buildSettings = {
@@ -284,14 +314,20 @@
284 CLANG_CXX_LIBRARY = "libc++";
314 CLANG_CXX_LIBRARY = "libc++";
285 CLANG_ENABLE_MODULES = YES;
315 CLANG_ENABLE_MODULES = YES;
286 CLANG_ENABLE_OBJC_ARC = YES;
316 CLANG_ENABLE_OBJC_ARC = YES;
317+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
287 CLANG_WARN_BOOL_CONVERSION = YES;
318 CLANG_WARN_BOOL_CONVERSION = YES;
319+ CLANG_WARN_COMMA = YES;
288 CLANG_WARN_CONSTANT_CONVERSION = YES;
320 CLANG_WARN_CONSTANT_CONVERSION = YES;
289 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
321 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
290 CLANG_WARN_EMPTY_BODY = YES;
322 CLANG_WARN_EMPTY_BODY = YES;
291 CLANG_WARN_ENUM_CONVERSION = YES;
323 CLANG_WARN_ENUM_CONVERSION = YES;
292 CLANG_WARN_INFINITE_RECURSION = YES;
324 CLANG_WARN_INFINITE_RECURSION = YES;
293 CLANG_WARN_INT_CONVERSION = YES;
325 CLANG_WARN_INT_CONVERSION = YES;
326+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
294 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
328 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
329+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
330+ CLANG_WARN_STRICT_PROTOTYPES = YES;
295 CLANG_WARN_SUSPICIOUS_MOVE = YES;
331 CLANG_WARN_SUSPICIOUS_MOVE = YES;
296 CLANG_WARN_UNREACHABLE_CODE = YES;
332 CLANG_WARN_UNREACHABLE_CODE = YES;
297 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -331,14 +367,20 @@
331 CLANG_CXX_LIBRARY = "libc++";
367 CLANG_CXX_LIBRARY = "libc++";
332 CLANG_ENABLE_MODULES = YES;
368 CLANG_ENABLE_MODULES = YES;
333 CLANG_ENABLE_OBJC_ARC = YES;
369 CLANG_ENABLE_OBJC_ARC = YES;
370+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
334 CLANG_WARN_BOOL_CONVERSION = YES;
371 CLANG_WARN_BOOL_CONVERSION = YES;
372+ CLANG_WARN_COMMA = YES;
335 CLANG_WARN_CONSTANT_CONVERSION = YES;
373 CLANG_WARN_CONSTANT_CONVERSION = YES;
336 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
374 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
337 CLANG_WARN_EMPTY_BODY = YES;
375 CLANG_WARN_EMPTY_BODY = YES;
338 CLANG_WARN_ENUM_CONVERSION = YES;
376 CLANG_WARN_ENUM_CONVERSION = YES;
339 CLANG_WARN_INFINITE_RECURSION = YES;
377 CLANG_WARN_INFINITE_RECURSION = YES;
340 CLANG_WARN_INT_CONVERSION = YES;
378 CLANG_WARN_INT_CONVERSION = YES;
379+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
380+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
341 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
381 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
382+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
383+ CLANG_WARN_STRICT_PROTOTYPES = YES;
342 CLANG_WARN_SUSPICIOUS_MOVE = YES;
384 CLANG_WARN_SUSPICIOUS_MOVE = YES;
343 CLANG_WARN_UNREACHABLE_CODE = YES;
385 CLANG_WARN_UNREACHABLE_CODE = YES;
344 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
386 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -372,7 +414,8 @@
372 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
414 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
373 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
415 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
374 PRODUCT_NAME = "$(TARGET_NAME)";
416 PRODUCT_NAME = "$(TARGET_NAME)";
417+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
375− SWIFT_VERSION = 3.0;
418+ SWIFT_VERSION = 4.0;
376 };
419 };
377 name = Debug;
420 name = Debug;
378 };
421 };
@@ -385,76 +428,37 @@
385 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
428 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
386 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
429 PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
387 PRODUCT_NAME = "$(TARGET_NAME)";
430 PRODUCT_NAME = "$(TARGET_NAME)";
388− SWIFT_VERSION = 3.0;
431+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
389− };
390− name = Release;
391− };
392− 319C19551B4843EB005EFEE5 /* Debug */ = {
393− isa = XCBuildConfiguration;
394− buildSettings = {
395− BUNDLE_LOADER = "$(TEST_HOST)";
396− DEVELOPMENT_TEAM = 289M6XEDV4;
397− FRAMEWORK_SEARCH_PATHS = (
398− "$(SDKROOT)/Developer/Library/Frameworks",
399− "$(inherited)",
400− );
401− GCC_PREPROCESSOR_DEFINITIONS = (
402− "DEBUG=1",
403− "$(inherited)",
404− );
405− INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
406− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
407− PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
408− PRODUCT_NAME = "$(TARGET_NAME)";
409− SWIFT_VERSION = 3.0;
432+ SWIFT_VERSION = 4.0;
410− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
411− };
412− name = Debug;
413− };
414− 319C19561B4843EB005EFEE5 /* Release */ = {
415− isa = XCBuildConfiguration;
416− buildSettings = {
417− BUNDLE_LOADER = "$(TEST_HOST)";
418− DEVELOPMENT_TEAM = 289M6XEDV4;
419− FRAMEWORK_SEARCH_PATHS = (
420− "$(SDKROOT)/Developer/Library/Frameworks",
421− "$(inherited)",
422− );
423− INFOPLIST_FILE = GMStepperExampleTests/Info.plist;
424− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
425− PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
426− PRODUCT_NAME = "$(TARGET_NAME)";
427− SWIFT_VERSION = 3.0;
428− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepperExample.app/GMStepperExample";
429 };
433 };
430 name = Release;
434 name = Release;
431 };
435 };
432/* End XCBuildConfiguration section */
436/* End XCBuildConfiguration section */
433
437
434/* Begin XCConfigurationList section */
438/* Begin XCConfigurationList section */
435− 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
439+ 3116C0DF1DA4DD360015AC69 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
436 isa = XCConfigurationList;
440 isa = XCConfigurationList;
437 buildConfigurations = (
441 buildConfigurations = (
438− 319C194F1B4843EB005EFEE5 /* Debug */,
442+ 3116C0E01DA4DD360015AC69 /* Debug */,
439− 319C19501B4843EB005EFEE5 /* Release */,
443+ 3116C0E11DA4DD360015AC69 /* Release */,
440 );
444 );
441 defaultConfigurationIsVisible = 0;
445 defaultConfigurationIsVisible = 0;
442 defaultConfigurationName = Release;
446 defaultConfigurationName = Release;
443 };
447 };
444− 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */ = {
448+ 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */ = {
445 isa = XCConfigurationList;
449 isa = XCConfigurationList;
446 buildConfigurations = (
450 buildConfigurations = (
447− 319C19521B4843EB005EFEE5 /* Debug */,
451+ 319C194F1B4843EB005EFEE5 /* Debug */,
448− 319C19531B4843EB005EFEE5 /* Release */,
452+ 319C19501B4843EB005EFEE5 /* Release */,
449 );
453 );
450 defaultConfigurationIsVisible = 0;
454 defaultConfigurationIsVisible = 0;
451 defaultConfigurationName = Release;
455 defaultConfigurationName = Release;
452 };
456 };
453− 319C19541B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExampleTests" */ = {
457+ 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */ = {
454 isa = XCConfigurationList;
458 isa = XCConfigurationList;
455 buildConfigurations = (
459 buildConfigurations = (
456− 319C19551B4843EB005EFEE5 /* Debug */,
460+ 319C19521B4843EB005EFEE5 /* Debug */,
457− 319C19561B4843EB005EFEE5 /* Release */,
461+ 319C19531B4843EB005EFEE5 /* Release */,
458 );
462 );
459 defaultConfigurationIsVisible = 0;
463 defaultConfigurationIsVisible = 0;
460 defaultConfigurationName = Release;
464 defaultConfigurationName = Release;
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: [NSObject: AnyObject]?) -> Bool {
17+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> 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 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.
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 inactive 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 active 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+30−34
@@ -1,9 +1,10 @@
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="10116" systemVersion="15E65" 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">
3 <dependencies>
3 <dependencies>
4 <deployment identifier="iOS"/>
4 <deployment identifier="iOS"/>
5− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
5+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
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"/>
7 </dependencies>
8 </dependencies>
8 <scenes>
9 <scenes>
9 <!--View Controller-->
10 <!--View Controller-->
@@ -15,12 +16,11 @@
15 <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
16 <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
16 </layoutGuides>
17 </layoutGuides>
17 <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
18 <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"/>
19 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
20 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
20 <subviews>
21 <subviews>
21 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AU6-4C-B2F" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
22 <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" white="1" alpha="1" colorSpace="calibratedWhite"/>
23+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
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,27 +34,26 @@
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"/>
38− <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"/>
39 <constraints>
38 <constraints>
40 <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
39 <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
41 <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
40 <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
42 </constraints>
41 </constraints>
43 <userDefinedRuntimeAttributes>
42 <userDefinedRuntimeAttributes>
44 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
43 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
45− <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"/>
46 </userDefinedRuntimeAttribute>
45 </userDefinedRuntimeAttribute>
47 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
46 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
48− <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"/>
49 </userDefinedRuntimeAttribute>
48 </userDefinedRuntimeAttribute>
50 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
49 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
51− <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"/>
52 </userDefinedRuntimeAttribute>
51 </userDefinedRuntimeAttribute>
53 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
52 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
54− <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"/>
55 </userDefinedRuntimeAttribute>
54 </userDefinedRuntimeAttribute>
56 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
55 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
57− <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"/>
58 </userDefinedRuntimeAttribute>
57 </userDefinedRuntimeAttribute>
59 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
58 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
60 <real key="value" value="0.5"/>
59 <real key="value" value="0.5"/>
@@ -62,49 +61,47 @@
62 </userDefinedRuntimeAttributes>
61 </userDefinedRuntimeAttributes>
63 </view>
62 </view>
64 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R9n-I0-fq7" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
63 <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"/>
66− <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"/>
67 <constraints>
65 <constraints>
68 <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
66 <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
69 <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
67 <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
70 </constraints>
68 </constraints>
71 <userDefinedRuntimeAttributes>
69 <userDefinedRuntimeAttributes>
72 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
70 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
73− <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"/>
74 </userDefinedRuntimeAttribute>
72 </userDefinedRuntimeAttribute>
75 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
73 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
76− <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"/>
77 </userDefinedRuntimeAttribute>
75 </userDefinedRuntimeAttribute>
78 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
76 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
79− <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"/>
80 </userDefinedRuntimeAttribute>
78 </userDefinedRuntimeAttribute>
81 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
79 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
82− <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"/>
83 </userDefinedRuntimeAttribute>
81 </userDefinedRuntimeAttribute>
84 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
82 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
85− <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"/>
86 </userDefinedRuntimeAttribute>
84 </userDefinedRuntimeAttribute>
87 </userDefinedRuntimeAttributes>
85 </userDefinedRuntimeAttributes>
88 </view>
86 </view>
89 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U8X-8Z-7Mo" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
87 <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"/>
91− <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"/>
92 <constraints>
89 <constraints>
93 <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
90 <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
94 <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
91 <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
95 </constraints>
92 </constraints>
96 <userDefinedRuntimeAttributes>
93 <userDefinedRuntimeAttributes>
97 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
94 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
98− <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"/>
99 </userDefinedRuntimeAttribute>
96 </userDefinedRuntimeAttribute>
100 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
97 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
101− <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"/>
102 </userDefinedRuntimeAttribute>
99 </userDefinedRuntimeAttribute>
103 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
100 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
104− <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"/>
105 </userDefinedRuntimeAttribute>
102 </userDefinedRuntimeAttribute>
106 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
103 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
107− <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"/>
108 </userDefinedRuntimeAttribute>
105 </userDefinedRuntimeAttribute>
109 <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
106 <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
110 <real key="value" value="0.69999999999999996"/>
107 <real key="value" value="0.69999999999999996"/>
@@ -115,7 +112,7 @@
115 <integer key="value" value="0"/>
112 <integer key="value" value="0"/>
116 </userDefinedRuntimeAttribute>
113 </userDefinedRuntimeAttribute>
117 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
114 <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
118− <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"/>
119 </userDefinedRuntimeAttribute>
116 </userDefinedRuntimeAttribute>
120 <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
117 <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
121 <integer key="value" value="100"/>
118 <integer key="value" value="100"/>
@@ -128,8 +125,7 @@
128 </variation>
125 </variation>
129 </view>
126 </view>
130 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Ri-Yr-sRs" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
127 <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"/>
132− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
128+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
133 <constraints>
129 <constraints>
134 <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
130 <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
135 <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
131 <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
@@ -148,24 +144,24 @@
148 <real key="value" value="4"/>
144 <real key="value" value="4"/>
149 </userDefinedRuntimeAttribute>
145 </userDefinedRuntimeAttribute>
150 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
146 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
151− <color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
147+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
152 </userDefinedRuntimeAttribute>
148 </userDefinedRuntimeAttribute>
153 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
149 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
154− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
150+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
155 </userDefinedRuntimeAttribute>
151 </userDefinedRuntimeAttribute>
156 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
152 <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
157− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
153+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
158 </userDefinedRuntimeAttribute>
154 </userDefinedRuntimeAttribute>
159 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
155 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
160− <color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
156+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
161 </userDefinedRuntimeAttribute>
157 </userDefinedRuntimeAttribute>
162 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
158 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
163− <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
159+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
164 </userDefinedRuntimeAttribute>
160 </userDefinedRuntimeAttribute>
165 </userDefinedRuntimeAttributes>
161 </userDefinedRuntimeAttributes>
166 </view>
162 </view>
167 </subviews>
163 </subviews>
168− <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"/>
169 <constraints>
165 <constraints>
170 <constraint firstItem="R9n-I0-fq7" firstAttribute="centerX" secondItem="U8X-8Z-7Mo" secondAttribute="centerX" id="3cD-WW-Qg4"/>
166 <constraint firstItem="R9n-I0-fq7" firstAttribute="centerX" secondItem="U8X-8Z-7Mo" secondAttribute="centerX" id="3cD-WW-Qg4"/>
171 <constraint firstItem="if7-U5-bAM" firstAttribute="top" secondItem="AU6-4C-B2F" secondAttribute="bottom" constant="44" id="662-W9-CUn"/>
167 <constraint firstItem="if7-U5-bAM" firstAttribute="top" secondItem="AU6-4C-B2F" secondAttribute="bottom" constant="44" id="662-W9-CUn"/>
GMStepperExample/GMStepperExample/ViewController.swift+1−1
@@ -16,7 +16,7 @@ class ViewController: UIViewController {
16 stepper.addTarget(self, action: #selector(ViewController.stepperValueChanged), for: .valueChanged)
16 stepper.addTarget(self, action: #selector(ViewController.stepperValueChanged), for: .valueChanged)
17 }
17 }
18
18
19− func stepperValueChanged(stepper: GMStepper) {
19+ @objc 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 UIKit
10import XCTest
9import XCTest
10+import UIKit
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,8 +16,6 @@
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>
21 <key>CFBundleVersion</key>
19 <key>CFBundleVersion</key>
22 <string>1</string>
20 <string>1</string>
23</dict>
21</dict>
README.md+7−2
@@ -5,6 +5,7 @@
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+
8## Screenshot
9## Screenshot
9
10
10![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
11![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
@@ -68,6 +69,9 @@ var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alph
68/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
69/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
69var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
70var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
70
71
72+/// Corner radius of the middle label's layer. Defaults to 0.0.
73+var labelCornerRadius: CGFloat = 0.0
74+
71/// Corner radius of the stepper's layer. Defaults to 4.0.
75/// Corner radius of the stepper's layer. Defaults to 4.0.
72var cornerRadius: CGFloat = 4.0
76var cornerRadius: CGFloat = 4.0
73
77
@@ -85,9 +89,10 @@ var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, al
85```
89```
86
90
87
91
88−## Author
92+## Authors
89
93
94+* [Brent Whitman](https://github.com/bwhtmn) - Maintainer
90−Günay Mert Karadoğan, mertkaradogan@gmail.com
95+* [Günay Mert Karadoğan](https://github.com/gmertk) - Creator
91
96
92## License
97## License
93
98