on master help sign in
24 files changed+1344−1002
since splitsnapshots
unifiedsplit
.gitignore+2 .swift-version+1 GMStepper.podspec+14 GMStepper/GMStepper.swift+521 GMStepper/GMStepper.xcodeproj/project.pbxproj−508 GMStepper/GMStepper/Assets.xcassets/Contents.json−6 GMStepper/GMStepper/Base.lproj/LaunchScreen.storyboard−49 GMStepper/GMStepper/GMStepper.swift−205 GMStepper/GMStepper/ViewController.swift−24 GMStepper/GMStepperTests/GMStepperTests.swift−35 GMStepper/GMStepperUITests/GMStepperUITests.swift−35 GMStepper/GMStepperUITests/Info.plist−24 GMStepperExample/GMStepperExample.xcodeproj/project.pbxproj+469 GMStepper/GMStepper.xcodeproj/project.xcworkspace/contents.xcworkspacedata → GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata+1−1 GMStepper/GMStepper/AppDelegate.swift → GMStepperExample/GMStepperExample/AppDelegate.swift+13−13 GMStepperExample/GMStepperExample/Base.lproj/LaunchScreen.xib+45 GMStepper/GMStepper/Base.lproj/Main.storyboard → GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard+114−99 GMStepper/GMStepper/Assets.xcassets/AppIcon.appiconset/Contents.json → GMStepperExample/GMStepperExample/Images.xcassets/AppIcon.appiconset/Contents.json GMStepper/GMStepper/Info.plist → GMStepperExample/GMStepperExample/Info.plist GMStepperExample/GMStepperExample/ViewController.swift+22 GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swift+42 GMStepper/GMStepperTests/Info.plist → GMStepperExample/GMStepperExampleTests/Info.plist−2 README.md+100−1 Screenshots/screenshot_1.gif
.gitignore+2
@@ -31,3 +31,5 @@ DerivedData
3131# Carthage/Checkouts
3232
3333Carthage/Build
34+
35+.DS_Store
.swift-versionnew file+1
@@ -0,0 +1 @@
1+4.0
GMStepper.podspecnew file+14
@@ -0,0 +1,14 @@
1+Pod::Spec.new do |s|
2+ s.name = "GMStepper"
3+ s.version = "2.1"
4+ s.summary = "A stepper with a sliding label in the middle."
5+ s.homepage = "https://github.com/gmertk/GMStepper"
6+ s.screenshots = "https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif"
7+ s.license = 'MIT'
8+ s.author = { "Gunay Mert Karadogan" => "mertkaradogan@gmail.com" }
9+ s.source = { :git => "https://github.com/gmertk/GMStepper.git", :tag => s.version.to_s }
10+ s.social_media_url = 'https://twitter.com/gunaymertk'
11+ s.platform = :ios, '8.0'
12+ s.requires_arc = true
13+ s.source_files = 'GMStepper/*.swift'
14+end
GMStepper/GMStepper.swiftnew file+521
@@ -0,0 +1,521 @@
1+//
2+// GMStepper.swift
3+// GMStepper
4+//
5+// Created by Gunay Mert Karadogan on 1/7/15.
6+// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
7+//
8+
9+import UIKit
10+
11+@IBDesignable public class GMStepper: UIControl {
12+
13+ /// Current value of the stepper. Defaults to 0.
14+ @objc @IBInspectable public var value: Double = 0 {
15+ didSet {
16+ value = min(maximumValue, max(minimumValue, value))
17+
18+ let isInteger = floor(value) == value
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 {
28+ label.text = String(stringInterpolationSegment: Int(value))
29+ } else {
30+ label.text = String(stringInterpolationSegment: value)
31+ }
32+
33+ if oldValue != value {
34+ sendActions(for: .valueChanged)
35+ }
36+ }
37+ }
38+
39+ /// Minimum value. Must be less than maximumValue. Defaults to 0.
40+ @objc @IBInspectable public var minimumValue: Double = 0 {
41+ didSet {
42+ value = min(maximumValue, max(minimumValue, value))
43+ }
44+ }
45+
46+ /// Maximum value. Must be more than minimumValue. Defaults to 100.
47+ @objc @IBInspectable public var maximumValue: Double = 100 {
48+ didSet {
49+ value = min(maximumValue, max(minimumValue, value))
50+ }
51+ }
52+
53+ /// Step/Increment value as in UIStepper. Defaults to 1.
54+ @objc @IBInspectable public var stepValue: Double = 1
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.
57+ @objc @IBInspectable public var autorepeat: Bool = true
58+
59+ /// If the value is integer, it is shown without floating point.
60+ @objc @IBInspectable public var showIntegerIfDoubleIsInteger: Bool = true
61+
62+ /// Text on the left button. Be sure that it fits in the button. Defaults to "−".
63+ @objc @IBInspectable public var leftButtonText: String = "−" {
64+ didSet {
65+ leftButton.setTitle(leftButtonText, for: .normal)
66+ }
67+ }
68+
69+ /// Text on the right button. Be sure that it fits in the button. Defaults to "+".
70+ @objc @IBInspectable public var rightButtonText: String = "+" {
71+ didSet {
72+ rightButton.setTitle(rightButtonText, for: .normal)
73+ }
74+ }
75+
76+ /// Text color of the buttons. Defaults to white.
77+ @objc @IBInspectable public var buttonsTextColor: UIColor = UIColor.white {
78+ didSet {
79+ for button in [leftButton, rightButton] {
80+ button.setTitleColor(buttonsTextColor, for: .normal)
81+ }
82+ }
83+ }
84+
85+ /// 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) {
87+ didSet {
88+ for button in [leftButton, rightButton] {
89+ button.backgroundColor = buttonsBackgroundColor
90+ }
91+ backgroundColor = buttonsBackgroundColor
92+ }
93+ }
94+
95+ /// 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)! {
97+ didSet {
98+ for button in [leftButton, rightButton] {
99+ button.titleLabel?.font = buttonsFont
100+ }
101+ }
102+ }
103+
104+ /// Text color of the middle label. Defaults to white.
105+ @objc @IBInspectable public var labelTextColor: UIColor = UIColor.white {
106+ didSet {
107+ label.textColor = labelTextColor
108+ }
109+ }
110+
111+ /// 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) {
113+ didSet {
114+ label.backgroundColor = labelBackgroundColor
115+ }
116+ }
117+
118+ /// 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)! {
120+ didSet {
121+ label.font = labelFont
122+ }
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+ }
131+
132+ /// Corner radius of the stepper's layer. Defaults to 4.0.
133+ @objc @IBInspectable public var cornerRadius: CGFloat = 4.0 {
134+ didSet {
135+ layer.cornerRadius = cornerRadius
136+ clipsToBounds = true
137+ }
138+ }
139+
140+ /// Border width of the stepper and middle label's layer. Defaults to 0.0.
141+ @objc @IBInspectable public var borderWidth: CGFloat = 0.0 {
142+ didSet {
143+ layer.borderWidth = borderWidth
144+ label.layer.borderWidth = borderWidth
145+ }
146+ }
147+
148+ /// Color of the border of the stepper and middle label's layer. Defaults to clear color.
149+ @objc @IBInspectable public var borderColor: UIColor = UIColor.clear {
150+ didSet {
151+ layer.borderColor = borderColor.cgColor
152+ label.layer.borderColor = borderColor.cgColor
153+ }
154+ }
155+
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.
157+ @objc @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
158+ didSet {
159+ labelWidthWeight = min(1, max(0, labelWidthWeight))
160+ setNeedsLayout()
161+ }
162+ }
163+
164+ /// 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)
166+
167+ /**
168+ Width of the sliding animation. When buttons clicked, the middle label does a slide animation towards to the clicked button. Defaults to 5.
169+ */
170+ let labelSlideLength: CGFloat = 5
171+
172+ /// Duration of the sliding animation
173+ let labelSlideDuration = TimeInterval(0.1)
174+
175+ /// Duration of the animation when the value hits the limit.
176+ let limitHitAnimationDuration = TimeInterval(0.1)
177+
178+ lazy var leftButton: UIButton = {
179+ let button = UIButton()
180+ button.setTitle(self.leftButtonText, for: .normal)
181+ button.setTitleColor(self.buttonsTextColor, for: .normal)
182+ button.backgroundColor = self.buttonsBackgroundColor
183+ button.titleLabel?.font = self.buttonsFont
184+ button.addTarget(self, action: #selector(GMStepper.leftButtonTouchDown), for: .touchDown)
185+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
186+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
187+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
188+ return button
189+ }()
190+
191+ lazy var rightButton: UIButton = {
192+ let button = UIButton()
193+ button.setTitle(self.rightButtonText, for: .normal)
194+ button.setTitleColor(self.buttonsTextColor, for: .normal)
195+ button.backgroundColor = self.buttonsBackgroundColor
196+ button.titleLabel?.font = self.buttonsFont
197+ button.addTarget(self, action: #selector(GMStepper.rightButtonTouchDown), for: .touchDown)
198+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpInside)
199+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchUpOutside)
200+ button.addTarget(self, action: #selector(GMStepper.buttonTouchUp), for: .touchCancel)
201+ return button
202+ }()
203+
204+ lazy var label: UILabel = {
205+ let label = UILabel()
206+ label.textAlignment = .center
207+ if self.showIntegerIfDoubleIsInteger && floor(self.value) == self.value {
208+ label.text = String(stringInterpolationSegment: Int(self.value))
209+ } else {
210+ label.text = String(stringInterpolationSegment: self.value)
211+ }
212+ label.textColor = self.labelTextColor
213+ label.backgroundColor = self.labelBackgroundColor
214+ label.font = self.labelFont
215+ label.layer.cornerRadius = self.labelCornerRadius
216+ label.layer.masksToBounds = true
217+ label.isUserInteractionEnabled = true
218+ let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(GMStepper.handlePan))
219+ panRecognizer.maximumNumberOfTouches = 1
220+ label.addGestureRecognizer(panRecognizer)
221+ return label
222+ }()
223+
224+ var labelOriginalCenter: CGPoint!
225+ var labelMaximumCenterX: CGFloat!
226+ var labelMinimumCenterX: CGFloat!
227+
228+ enum LabelPanState {
229+ case Stable, HitRightEdge, HitLeftEdge
230+ }
231+ var panState = LabelPanState.Stable
232+
233+ enum StepperState {
234+ case Stable, ShouldIncrease, ShouldDecrease
235+ }
236+ var stepperState = StepperState.Stable {
237+ didSet {
238+ if stepperState != .Stable {
239+ updateValue()
240+ if autorepeat {
241+ scheduleTimer()
242+ }
243+ }
244+ }
245+ }
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+
271+ /// Timer used for autorepeat option
272+ var timer: Timer?
273+
274+ /** 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:
276+ - First 2.5 sec, the stepper changes the value every 0.5 sec.
277+ - For the next 1.5 sec, it changes the value every 0.1 sec.
278+ - Then, every 0.05 sec.
279+ */
280+ let timerInterval = TimeInterval(0.05)
281+
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.
283+ var timerFireCount = 0
284+ var timerFireCountModulo: Int {
285+ if timerFireCount > 80 {
286+ return 1 // 0.05 sec * 1 = 0.05 sec
287+ } else if timerFireCount > 50 {
288+ return 2 // 0.05 sec * 2 = 0.1 sec
289+ } else {
290+ return 10 // 0.05 sec * 10 = 0.5 sec
291+ }
292+ }
293+
294+ @objc required public init?(coder aDecoder: NSCoder) {
295+ super.init(coder: aDecoder)
296+ setup()
297+ }
298+
299+ @objc public override init(frame: CGRect) {
300+ super.init(frame: frame)
301+ setup()
302+ }
303+
304+ func setup() {
305+ addSubview(leftButton)
306+ addSubview(rightButton)
307+ addSubview(label)
308+
309+ backgroundColor = buttonsBackgroundColor
310+ layer.cornerRadius = cornerRadius
311+ clipsToBounds = true
312+ labelOriginalCenter = label.center
313+
314+ NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
315+ }
316+
317+ public override func layoutSubviews() {
318+ let buttonWidth = bounds.size.width * ((1 - labelWidthWeight) / 2)
319+ let labelWidth = bounds.size.width * labelWidthWeight
320+
321+ leftButton.frame = CGRect(x: 0, y: 0, width: buttonWidth, height: bounds.size.height)
322+ label.frame = CGRect(x: buttonWidth, y: 0, width: labelWidth, height: bounds.size.height)
323+ rightButton.frame = CGRect(x: labelWidth + buttonWidth, y: 0, width: buttonWidth, height: bounds.size.height)
324+
325+ labelMaximumCenterX = label.center.x + labelSlideLength
326+ labelMinimumCenterX = label.center.x - labelSlideLength
327+ labelOriginalCenter = label.center
328+ }
329+
330+ func updateValue() {
331+ if stepperState == .ShouldIncrease {
332+ value += stepValue
333+ } else if stepperState == .ShouldDecrease {
334+ value -= stepValue
335+ }
336+ }
337+
338+ deinit {
339+ resetTimer()
340+ NotificationCenter.default.removeObserver(self)
341+ }
342+
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.
344+// lazy var printTimerGaps: () -> () = {
345+// var prevTime: CFAbsoluteTime?
346+//
347+// return { _ in
348+// var now = CFAbsoluteTimeGetCurrent()
349+// if let prevTime = prevTime {
350+// print(now - prevTime)
351+// }
352+// prevTime = now
353+// }
354+// }()
355+}
356+
357+// MARK: Pan Gesture
358+extension GMStepper {
359+ @objc func handlePan(gesture: UIPanGestureRecognizer) {
360+ switch gesture.state {
361+ case .began:
362+ leftButton.isEnabled = false
363+ rightButton.isEnabled = false
364+ case .changed:
365+ let translation = gesture.translation(in: label)
366+ gesture.setTranslation(CGPoint.zero, in: label)
367+
368+ let slidingRight = gesture.velocity(in: label).x > 0
369+ let slidingLeft = gesture.velocity(in: label).x < 0
370+
371+ // Move the label with pan
372+ if slidingRight {
373+ label.center.x = min(labelMaximumCenterX, label.center.x + translation.x)
374+ } else if slidingLeft {
375+ label.center.x = max(labelMinimumCenterX, label.center.x + translation.x)
376+ }
377+
378+ // When the label hits the edges, increase/decrease value and change button backgrounds
379+ if label.center.x == labelMaximumCenterX {
380+ // If not hit the right edge before, increase the value and start the timer. If already hit the edge, do nothing. Timer will handle it.
381+ if panState != .HitRightEdge {
382+ stepperState = .ShouldIncrease
383+ panState = .HitRightEdge
384+ }
385+
386+ animateLimitHitIfNeeded()
387+ } else if label.center.x == labelMinimumCenterX {
388+ if panState != .HitLeftEdge {
389+ stepperState = .ShouldDecrease
390+ panState = .HitLeftEdge
391+ }
392+
393+ animateLimitHitIfNeeded()
394+ } else {
395+ panState = .Stable
396+ stepperState = .Stable
397+ resetTimer()
398+
399+ self.rightButton.backgroundColor = self.buttonsBackgroundColor
400+ self.leftButton.backgroundColor = self.buttonsBackgroundColor
401+ }
402+ case .ended, .cancelled, .failed:
403+ reset()
404+ default:
405+ break
406+ }
407+ }
408+
409+ @objc func reset() {
410+ panState = .Stable
411+ stepperState = .Stable
412+ resetTimer()
413+
414+ leftButton.isEnabled = true
415+ rightButton.isEnabled = true
416+ label.isUserInteractionEnabled = true
417+
418+ UIView.animate(withDuration: self.labelSlideDuration, animations: {
419+ self.label.center = self.labelOriginalCenter
420+ self.rightButton.backgroundColor = self.buttonsBackgroundColor
421+ self.leftButton.backgroundColor = self.buttonsBackgroundColor
422+ })
423+ }
424+}
425+
426+// MARK: Button Events
427+extension GMStepper {
428+ @objc func leftButtonTouchDown(button: UIButton) {
429+ rightButton.isEnabled = false
430+ label.isUserInteractionEnabled = false
431+ resetTimer()
432+
433+ if value == minimumValue {
434+ animateLimitHitIfNeeded()
435+ } else {
436+ stepperState = .ShouldDecrease
437+ animateSlideLeft()
438+ }
439+
440+ }
441+
442+ @objc func rightButtonTouchDown(button: UIButton) {
443+ leftButton.isEnabled = false
444+ label.isUserInteractionEnabled = false
445+ resetTimer()
446+
447+ if value == maximumValue {
448+ animateLimitHitIfNeeded()
449+ } else {
450+ stepperState = .ShouldIncrease
451+ animateSlideRight()
452+ }
453+ }
454+
455+ @objc func buttonTouchUp(button: UIButton) {
456+ reset()
457+ }
458+}
459+
460+// MARK: Animations
461+extension GMStepper {
462+
463+ func animateSlideLeft() {
464+ UIView.animate(withDuration: labelSlideDuration) {
465+ self.label.center.x -= self.labelSlideLength
466+ }
467+ }
468+
469+ func animateSlideRight() {
470+ UIView.animate(withDuration: labelSlideDuration) {
471+ self.label.center.x += self.labelSlideLength
472+ }
473+ }
474+
475+ func animateToOriginalPosition() {
476+ if self.label.center != self.labelOriginalCenter {
477+ UIView.animate(withDuration: labelSlideDuration) {
478+ self.label.center = self.labelOriginalCenter
479+ }
480+ }
481+ }
482+
483+ func animateLimitHitIfNeeded() {
484+ if value == minimumValue {
485+ animateLimitHitForButton(button: leftButton)
486+ } else if value == maximumValue {
487+ animateLimitHitForButton(button: rightButton)
488+ }
489+ }
490+
491+ func animateLimitHitForButton(button: UIButton){
492+ UIView.animate(withDuration: limitHitAnimationDuration) {
493+ button.backgroundColor = self.limitHitAnimationColor
494+ }
495+ }
496+}
497+
498+// MARK: Timer
499+extension GMStepper {
500+ @objc func handleTimerFire(timer: Timer) {
501+ timerFireCount += 1
502+
503+ if timerFireCount % timerFireCountModulo == 0 {
504+ updateValue()
505+ }
506+ }
507+
508+ func scheduleTimer() {
509+ timer = Timer.scheduledTimer(timeInterval: timerInterval, target: self, selector: #selector(GMStepper.handleTimerFire), userInfo: nil, repeats: true)
510+ }
511+
512+ func resetTimer() {
513+ if let timer = timer {
514+ timer.invalidate()
515+ self.timer = nil
516+ timerFireCount = 0
517+ }
518+ }
519+
520+
521+}
GMStepper/GMStepper.xcodeproj/project.pbxprojdeleted−508
@@ -1,508 +0,0 @@
1−// !$*UTF8*$!
2−{
3− archiveVersion = 1;
4− classes = {
5− };
6− objectVersion = 46;
7− objects = {
8−
9−/* Begin PBXBuildFile section */
10− 31DCC9F61B43FAB000950781 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DCC9F51B43FAB000950781 /* AppDelegate.swift */; };
11− 31DCC9F81B43FAB000950781 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DCC9F71B43FAB000950781 /* ViewController.swift */; };
12− 31DCC9FB1B43FAB000950781 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 31DCC9F91B43FAB000950781 /* Main.storyboard */; };
13− 31DCC9FD1B43FAB000950781 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 31DCC9FC1B43FAB000950781 /* Assets.xcassets */; };
14− 31DCCA001B43FAB000950781 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 31DCC9FE1B43FAB000950781 /* LaunchScreen.storyboard */; };
15− 31DCCA0B1B43FAB000950781 /* GMStepperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DCCA0A1B43FAB000950781 /* GMStepperTests.swift */; };
16− 31DCCA161B43FAB000950781 /* GMStepperUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DCCA151B43FAB000950781 /* GMStepperUITests.swift */; };
17− 31DCCA241B43FB6200950781 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DCCA231B43FB6200950781 /* GMStepper.swift */; };
18−/* End PBXBuildFile section */
19−
20−/* Begin PBXContainerItemProxy section */
21− 31DCCA071B43FAB000950781 /* PBXContainerItemProxy */ = {
22− isa = PBXContainerItemProxy;
23− containerPortal = 31DCC9EA1B43FAB000950781 /* Project object */;
24− proxyType = 1;
25− remoteGlobalIDString = 31DCC9F11B43FAB000950781;
26− remoteInfo = GMStepper;
27− };
28− 31DCCA121B43FAB000950781 /* PBXContainerItemProxy */ = {
29− isa = PBXContainerItemProxy;
30− containerPortal = 31DCC9EA1B43FAB000950781 /* Project object */;
31− proxyType = 1;
32− remoteGlobalIDString = 31DCC9F11B43FAB000950781;
33− remoteInfo = GMStepper;
34− };
35−/* End PBXContainerItemProxy section */
36−
37−/* Begin PBXFileReference section */
38− 31DCC9F21B43FAB000950781 /* GMStepper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMStepper.app; sourceTree = BUILT_PRODUCTS_DIR; };
39− 31DCC9F51B43FAB000950781 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
40− 31DCC9F71B43FAB000950781 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
41− 31DCC9FA1B43FAB000950781 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
42− 31DCC9FC1B43FAB000950781 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
43− 31DCC9FF1B43FAB000950781 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
44− 31DCCA011B43FAB000950781 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
45− 31DCCA061B43FAB000950781 /* GMStepperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMStepperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
46− 31DCCA0A1B43FAB000950781 /* GMStepperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMStepperTests.swift; sourceTree = "<group>"; };
47− 31DCCA0C1B43FAB000950781 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48− 31DCCA111B43FAB000950781 /* GMStepperUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMStepperUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49− 31DCCA151B43FAB000950781 /* GMStepperUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMStepperUITests.swift; sourceTree = "<group>"; };
50− 31DCCA171B43FAB000950781 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
51− 31DCCA231B43FB6200950781 /* GMStepper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GMStepper.swift; sourceTree = "<group>"; };
52−/* End PBXFileReference section */
53−
54−/* Begin PBXFrameworksBuildPhase section */
55− 31DCC9EF1B43FAB000950781 /* Frameworks */ = {
56− isa = PBXFrameworksBuildPhase;
57− buildActionMask = 2147483647;
58− files = (
59− );
60− runOnlyForDeploymentPostprocessing = 0;
61− };
62− 31DCCA031B43FAB000950781 /* Frameworks */ = {
63− isa = PBXFrameworksBuildPhase;
64− buildActionMask = 2147483647;
65− files = (
66− );
67− runOnlyForDeploymentPostprocessing = 0;
68− };
69− 31DCCA0E1B43FAB000950781 /* Frameworks */ = {
70− isa = PBXFrameworksBuildPhase;
71− buildActionMask = 2147483647;
72− files = (
73− );
74− runOnlyForDeploymentPostprocessing = 0;
75− };
76−/* End PBXFrameworksBuildPhase section */
77−
78−/* Begin PBXGroup section */
79− 31DCC9E91B43FAB000950781 = {
80− isa = PBXGroup;
81− children = (
82− 31DCC9F41B43FAB000950781 /* GMStepper */,
83− 31DCCA091B43FAB000950781 /* GMStepperTests */,
84− 31DCCA141B43FAB000950781 /* GMStepperUITests */,
85− 31DCC9F31B43FAB000950781 /* Products */,
86− );
87− sourceTree = "<group>";
88− };
89− 31DCC9F31B43FAB000950781 /* Products */ = {
90− isa = PBXGroup;
91− children = (
92− 31DCC9F21B43FAB000950781 /* GMStepper.app */,
93− 31DCCA061B43FAB000950781 /* GMStepperTests.xctest */,
94− 31DCCA111B43FAB000950781 /* GMStepperUITests.xctest */,
95− );
96− name = Products;
97− sourceTree = "<group>";
98− };
99− 31DCC9F41B43FAB000950781 /* GMStepper */ = {
100− isa = PBXGroup;
101− children = (
102− 31DCC9F51B43FAB000950781 /* AppDelegate.swift */,
103− 31DCC9F71B43FAB000950781 /* ViewController.swift */,
104− 31DCCA231B43FB6200950781 /* GMStepper.swift */,
105− 31DCC9F91B43FAB000950781 /* Main.storyboard */,
106− 31DCC9FC1B43FAB000950781 /* Assets.xcassets */,
107− 31DCC9FE1B43FAB000950781 /* LaunchScreen.storyboard */,
108− 31DCCA011B43FAB000950781 /* Info.plist */,
109− );
110− path = GMStepper;
111− sourceTree = "<group>";
112− };
113− 31DCCA091B43FAB000950781 /* GMStepperTests */ = {
114− isa = PBXGroup;
115− children = (
116− 31DCCA0A1B43FAB000950781 /* GMStepperTests.swift */,
117− 31DCCA0C1B43FAB000950781 /* Info.plist */,
118− );
119− path = GMStepperTests;
120− sourceTree = "<group>";
121− };
122− 31DCCA141B43FAB000950781 /* GMStepperUITests */ = {
123− isa = PBXGroup;
124− children = (
125− 31DCCA151B43FAB000950781 /* GMStepperUITests.swift */,
126− 31DCCA171B43FAB000950781 /* Info.plist */,
127− );
128− path = GMStepperUITests;
129− sourceTree = "<group>";
130− };
131−/* End PBXGroup section */
132−
133−/* Begin PBXNativeTarget section */
134− 31DCC9F11B43FAB000950781 /* GMStepper */ = {
135− isa = PBXNativeTarget;
136− buildConfigurationList = 31DCCA1A1B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepper" */;
137− buildPhases = (
138− 31DCC9EE1B43FAB000950781 /* Sources */,
139− 31DCC9EF1B43FAB000950781 /* Frameworks */,
140− 31DCC9F01B43FAB000950781 /* Resources */,
141− );
142− buildRules = (
143− );
144− dependencies = (
145− );
146− name = GMStepper;
147− productName = GMStepper;
148− productReference = 31DCC9F21B43FAB000950781 /* GMStepper.app */;
149− productType = "com.apple.product-type.application";
150− };
151− 31DCCA051B43FAB000950781 /* GMStepperTests */ = {
152− isa = PBXNativeTarget;
153− buildConfigurationList = 31DCCA1D1B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepperTests" */;
154− buildPhases = (
155− 31DCCA021B43FAB000950781 /* Sources */,
156− 31DCCA031B43FAB000950781 /* Frameworks */,
157− 31DCCA041B43FAB000950781 /* Resources */,
158− );
159− buildRules = (
160− );
161− dependencies = (
162− 31DCCA081B43FAB000950781 /* PBXTargetDependency */,
163− );
164− name = GMStepperTests;
165− productName = GMStepperTests;
166− productReference = 31DCCA061B43FAB000950781 /* GMStepperTests.xctest */;
167− productType = "com.apple.product-type.bundle.unit-test";
168− };
169− 31DCCA101B43FAB000950781 /* GMStepperUITests */ = {
170− isa = PBXNativeTarget;
171− buildConfigurationList = 31DCCA201B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepperUITests" */;
172− buildPhases = (
173− 31DCCA0D1B43FAB000950781 /* Sources */,
174− 31DCCA0E1B43FAB000950781 /* Frameworks */,
175− 31DCCA0F1B43FAB000950781 /* Resources */,
176− );
177− buildRules = (
178− );
179− dependencies = (
180− 31DCCA131B43FAB000950781 /* PBXTargetDependency */,
181− );
182− name = GMStepperUITests;
183− productName = GMStepperUITests;
184− productReference = 31DCCA111B43FAB000950781 /* GMStepperUITests.xctest */;
185− productType = "com.apple.product-type.bundle.ui-testing";
186− };
187−/* End PBXNativeTarget section */
188−
189−/* Begin PBXProject section */
190− 31DCC9EA1B43FAB000950781 /* Project object */ = {
191− isa = PBXProject;
192− attributes = {
193− LastUpgradeCheck = 0700;
194− ORGANIZATIONNAME = "Gunay Mert Karadogan";
195− TargetAttributes = {
196− 31DCC9F11B43FAB000950781 = {
197− CreatedOnToolsVersion = 7.0;
198− };
199− 31DCCA051B43FAB000950781 = {
200− CreatedOnToolsVersion = 7.0;
201− TestTargetID = 31DCC9F11B43FAB000950781;
202− };
203− 31DCCA101B43FAB000950781 = {
204− CreatedOnToolsVersion = 7.0;
205− TestTargetID = 31DCC9F11B43FAB000950781;
206− };
207− };
208− };
209− buildConfigurationList = 31DCC9ED1B43FAB000950781 /* Build configuration list for PBXProject "GMStepper" */;
210− compatibilityVersion = "Xcode 3.2";
211− developmentRegion = English;
212− hasScannedForEncodings = 0;
213− knownRegions = (
214− en,
215− Base,
216− );
217− mainGroup = 31DCC9E91B43FAB000950781;
218− productRefGroup = 31DCC9F31B43FAB000950781 /* Products */;
219− projectDirPath = "";
220− projectRoot = "";
221− targets = (
222− 31DCC9F11B43FAB000950781 /* GMStepper */,
223− 31DCCA051B43FAB000950781 /* GMStepperTests */,
224− 31DCCA101B43FAB000950781 /* GMStepperUITests */,
225− );
226− };
227−/* End PBXProject section */
228−
229−/* Begin PBXResourcesBuildPhase section */
230− 31DCC9F01B43FAB000950781 /* Resources */ = {
231− isa = PBXResourcesBuildPhase;
232− buildActionMask = 2147483647;
233− files = (
234− 31DCCA001B43FAB000950781 /* LaunchScreen.storyboard in Resources */,
235− 31DCC9FD1B43FAB000950781 /* Assets.xcassets in Resources */,
236− 31DCC9FB1B43FAB000950781 /* Main.storyboard in Resources */,
237− );
238− runOnlyForDeploymentPostprocessing = 0;
239− };
240− 31DCCA041B43FAB000950781 /* Resources */ = {
241− isa = PBXResourcesBuildPhase;
242− buildActionMask = 2147483647;
243− files = (
244− );
245− runOnlyForDeploymentPostprocessing = 0;
246− };
247− 31DCCA0F1B43FAB000950781 /* Resources */ = {
248− isa = PBXResourcesBuildPhase;
249− buildActionMask = 2147483647;
250− files = (
251− );
252− runOnlyForDeploymentPostprocessing = 0;
253− };
254−/* End PBXResourcesBuildPhase section */
255−
256−/* Begin PBXSourcesBuildPhase section */
257− 31DCC9EE1B43FAB000950781 /* Sources */ = {
258− isa = PBXSourcesBuildPhase;
259− buildActionMask = 2147483647;
260− files = (
261− 31DCC9F81B43FAB000950781 /* ViewController.swift in Sources */,
262− 31DCCA241B43FB6200950781 /* GMStepper.swift in Sources */,
263− 31DCC9F61B43FAB000950781 /* AppDelegate.swift in Sources */,
264− );
265− runOnlyForDeploymentPostprocessing = 0;
266− };
267− 31DCCA021B43FAB000950781 /* Sources */ = {
268− isa = PBXSourcesBuildPhase;
269− buildActionMask = 2147483647;
270− files = (
271− 31DCCA0B1B43FAB000950781 /* GMStepperTests.swift in Sources */,
272− );
273− runOnlyForDeploymentPostprocessing = 0;
274− };
275− 31DCCA0D1B43FAB000950781 /* Sources */ = {
276− isa = PBXSourcesBuildPhase;
277− buildActionMask = 2147483647;
278− files = (
279− 31DCCA161B43FAB000950781 /* GMStepperUITests.swift in Sources */,
280− );
281− runOnlyForDeploymentPostprocessing = 0;
282− };
283−/* End PBXSourcesBuildPhase section */
284−
285−/* Begin PBXTargetDependency section */
286− 31DCCA081B43FAB000950781 /* PBXTargetDependency */ = {
287− isa = PBXTargetDependency;
288− target = 31DCC9F11B43FAB000950781 /* GMStepper */;
289− targetProxy = 31DCCA071B43FAB000950781 /* PBXContainerItemProxy */;
290− };
291− 31DCCA131B43FAB000950781 /* PBXTargetDependency */ = {
292− isa = PBXTargetDependency;
293− target = 31DCC9F11B43FAB000950781 /* GMStepper */;
294− targetProxy = 31DCCA121B43FAB000950781 /* PBXContainerItemProxy */;
295− };
296−/* End PBXTargetDependency section */
297−
298−/* Begin PBXVariantGroup section */
299− 31DCC9F91B43FAB000950781 /* Main.storyboard */ = {
300− isa = PBXVariantGroup;
301− children = (
302− 31DCC9FA1B43FAB000950781 /* Base */,
303− );
304− name = Main.storyboard;
305− sourceTree = "<group>";
306− };
307− 31DCC9FE1B43FAB000950781 /* LaunchScreen.storyboard */ = {
308− isa = PBXVariantGroup;
309− children = (
310− 31DCC9FF1B43FAB000950781 /* Base */,
311− );
312− name = LaunchScreen.storyboard;
313− sourceTree = "<group>";
314− };
315−/* End PBXVariantGroup section */
316−
317−/* Begin XCBuildConfiguration section */
318− 31DCCA181B43FAB000950781 /* Debug */ = {
319− isa = XCBuildConfiguration;
320− buildSettings = {
321− ALWAYS_SEARCH_USER_PATHS = NO;
322− CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
323− CLANG_CXX_LIBRARY = "libc++";
324− CLANG_ENABLE_MODULES = YES;
325− CLANG_ENABLE_OBJC_ARC = YES;
326− CLANG_WARN_BOOL_CONVERSION = YES;
327− CLANG_WARN_CONSTANT_CONVERSION = YES;
328− CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
329− CLANG_WARN_EMPTY_BODY = YES;
330− CLANG_WARN_ENUM_CONVERSION = YES;
331− CLANG_WARN_INT_CONVERSION = YES;
332− CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333− CLANG_WARN_UNREACHABLE_CODE = YES;
334− CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335− "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336− COPY_PHASE_STRIP = NO;
337− DEBUG_INFORMATION_FORMAT = dwarf;
338− ENABLE_STRICT_OBJC_MSGSEND = YES;
339− ENABLE_TESTABILITY = YES;
340− GCC_C_LANGUAGE_STANDARD = gnu99;
341− GCC_DYNAMIC_NO_PIC = NO;
342− GCC_NO_COMMON_BLOCKS = YES;
343− GCC_OPTIMIZATION_LEVEL = 0;
344− GCC_PREPROCESSOR_DEFINITIONS = (
345− "DEBUG=1",
346− "$(inherited)",
347− );
348− GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
349− GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
350− GCC_WARN_UNDECLARED_SELECTOR = YES;
351− GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352− GCC_WARN_UNUSED_FUNCTION = YES;
353− GCC_WARN_UNUSED_VARIABLE = YES;
354− IPHONEOS_DEPLOYMENT_TARGET = 9.0;
355− MTL_ENABLE_DEBUG_INFO = YES;
356− ONLY_ACTIVE_ARCH = YES;
357− SDKROOT = iphoneos;
358− SWIFT_OPTIMIZATION_LEVEL = "-Onone";
359− };
360− name = Debug;
361− };
362− 31DCCA191B43FAB000950781 /* Release */ = {
363− isa = XCBuildConfiguration;
364− buildSettings = {
365− ALWAYS_SEARCH_USER_PATHS = NO;
366− CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
367− CLANG_CXX_LIBRARY = "libc++";
368− CLANG_ENABLE_MODULES = YES;
369− CLANG_ENABLE_OBJC_ARC = YES;
370− CLANG_WARN_BOOL_CONVERSION = YES;
371− CLANG_WARN_CONSTANT_CONVERSION = YES;
372− CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
373− CLANG_WARN_EMPTY_BODY = YES;
374− CLANG_WARN_ENUM_CONVERSION = YES;
375− CLANG_WARN_INT_CONVERSION = YES;
376− CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
377− CLANG_WARN_UNREACHABLE_CODE = YES;
378− CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
379− "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
380− COPY_PHASE_STRIP = NO;
381− DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
382− ENABLE_NS_ASSERTIONS = NO;
383− ENABLE_STRICT_OBJC_MSGSEND = YES;
384− GCC_C_LANGUAGE_STANDARD = gnu99;
385− GCC_NO_COMMON_BLOCKS = YES;
386− GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
387− GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
388− GCC_WARN_UNDECLARED_SELECTOR = YES;
389− GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
390− GCC_WARN_UNUSED_FUNCTION = YES;
391− GCC_WARN_UNUSED_VARIABLE = YES;
392− IPHONEOS_DEPLOYMENT_TARGET = 9.0;
393− MTL_ENABLE_DEBUG_INFO = NO;
394− SDKROOT = iphoneos;
395− VALIDATE_PRODUCT = YES;
396− };
397− name = Release;
398− };
399− 31DCCA1B1B43FAB000950781 /* Debug */ = {
400− isa = XCBuildConfiguration;
401− buildSettings = {
402− ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
403− INFOPLIST_FILE = GMStepper/Info.plist;
404− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
405− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepper;
406− PRODUCT_NAME = "$(TARGET_NAME)";
407− };
408− name = Debug;
409− };
410− 31DCCA1C1B43FAB000950781 /* Release */ = {
411− isa = XCBuildConfiguration;
412− buildSettings = {
413− ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
414− INFOPLIST_FILE = GMStepper/Info.plist;
415− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
416− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepper;
417− PRODUCT_NAME = "$(TARGET_NAME)";
418− };
419− name = Release;
420− };
421− 31DCCA1E1B43FAB000950781 /* Debug */ = {
422− isa = XCBuildConfiguration;
423− buildSettings = {
424− BUNDLE_LOADER = "$(TEST_HOST)";
425− INFOPLIST_FILE = GMStepperTests/Info.plist;
426− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
427− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepperTests;
428− PRODUCT_NAME = "$(TARGET_NAME)";
429− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepper.app/GMStepper";
430− };
431− name = Debug;
432− };
433− 31DCCA1F1B43FAB000950781 /* Release */ = {
434− isa = XCBuildConfiguration;
435− buildSettings = {
436− BUNDLE_LOADER = "$(TEST_HOST)";
437− INFOPLIST_FILE = GMStepperTests/Info.plist;
438− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
439− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepperTests;
440− PRODUCT_NAME = "$(TARGET_NAME)";
441− TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMStepper.app/GMStepper";
442− };
443− name = Release;
444− };
445− 31DCCA211B43FAB000950781 /* Debug */ = {
446− isa = XCBuildConfiguration;
447− buildSettings = {
448− INFOPLIST_FILE = GMStepperUITests/Info.plist;
449− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
450− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepperUITests;
451− PRODUCT_NAME = "$(TARGET_NAME)";
452− TEST_TARGET_NAME = GMStepper;
453− USES_XCTRUNNER = YES;
454− };
455− name = Debug;
456− };
457− 31DCCA221B43FAB000950781 /* Release */ = {
458− isa = XCBuildConfiguration;
459− buildSettings = {
460− INFOPLIST_FILE = GMStepperUITests/Info.plist;
461− LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
462− PRODUCT_BUNDLE_IDENTIFIER = com.gunaymert.GMStepperUITests;
463− PRODUCT_NAME = "$(TARGET_NAME)";
464− TEST_TARGET_NAME = GMStepper;
465− USES_XCTRUNNER = YES;
466− };
467− name = Release;
468− };
469−/* End XCBuildConfiguration section */
470−
471−/* Begin XCConfigurationList section */
472− 31DCC9ED1B43FAB000950781 /* Build configuration list for PBXProject "GMStepper" */ = {
473− isa = XCConfigurationList;
474− buildConfigurations = (
475− 31DCCA181B43FAB000950781 /* Debug */,
476− 31DCCA191B43FAB000950781 /* Release */,
477− );
478− defaultConfigurationIsVisible = 0;
479− defaultConfigurationName = Release;
480− };
481− 31DCCA1A1B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepper" */ = {
482− isa = XCConfigurationList;
483− buildConfigurations = (
484− 31DCCA1B1B43FAB000950781 /* Debug */,
485− 31DCCA1C1B43FAB000950781 /* Release */,
486− );
487− defaultConfigurationIsVisible = 0;
488− };
489− 31DCCA1D1B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepperTests" */ = {
490− isa = XCConfigurationList;
491− buildConfigurations = (
492− 31DCCA1E1B43FAB000950781 /* Debug */,
493− 31DCCA1F1B43FAB000950781 /* Release */,
494− );
495− defaultConfigurationIsVisible = 0;
496− };
497− 31DCCA201B43FAB000950781 /* Build configuration list for PBXNativeTarget "GMStepperUITests" */ = {
498− isa = XCConfigurationList;
499− buildConfigurations = (
500− 31DCCA211B43FAB000950781 /* Debug */,
501− 31DCCA221B43FAB000950781 /* Release */,
502− );
503− defaultConfigurationIsVisible = 0;
504− };
505−/* End XCConfigurationList section */
506− };
507− rootObject = 31DCC9EA1B43FAB000950781 /* Project object */;
508−}
GMStepper/GMStepper/Assets.xcassets/Contents.jsondeleted−6
@@ -1,6 +0,0 @@
1−{
2− "info" : {
3− "version" : 1,
4− "author" : "xcode"
5− }
6−}
GMStepper/GMStepper/Base.lproj/LaunchScreen.storyboarddeleted−49
@@ -1,49 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8076" systemVersion="14D121" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
3− <dependencies>
4− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8063"/>
5− <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6− </dependencies>
7− <scenes>
8− <!--View Controller-->
9− <scene sceneID="EHf-IW-A2E">
10− <objects>
11− <viewController id="01J-lp-oVM" sceneMemberID="viewController">
12− <layoutGuides>
13− <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
14− <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
15− </layoutGuides>
16− <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
17− <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19− <subviews>
20− <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright © 2015 Gunay Mert Karadogan. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
21− <rect key="frame" x="20" y="559" width="560" height="21"/>
22− <fontDescription key="fontDescription" type="system" pointSize="17"/>
23− <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
24− <nil key="highlightedColor"/>
25− </label>
26− <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GMStepper" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
27− <rect key="frame" x="20" y="180" width="560" height="43"/>
28− <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
29− <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
30− <nil key="highlightedColor"/>
31− </label>
32− </subviews>
33− <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
34− <constraints>
35− <constraint firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
36− <constraint firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
37− <constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
38− <constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
39− <constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
40− <constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
41− </constraints>
42− </view>
43− </viewController>
44− <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
45− </objects>
46− <point key="canvasLocation" x="53" y="375"/>
47− </scene>
48− </scenes>
49−</document>
GMStepper/GMStepper/GMStepper.swiftdeleted−205
@@ -1,205 +0,0 @@
1−//
2−// GMStepper.swift
3−// GMStepper
4−//
5−// Created by Gunay Mert Karadogan on 1/7/15.
6−// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
7−//
8−
9−import UIKit
10−
11−@IBDesignable public class GMStepper: UIControl {
12− public var value = 0 {
13− didSet {
14− value = min(maximumValue, max(minimumValue, value))
15− label.text = String(value)
16−
17− if oldValue != value {
18− sendActionsForControlEvents(.ValueChanged)
19− }
20− }
21− }
22−
23− @IBInspectable public var minimumValue: Int = 0 {
24− didSet {
25− value = 0
26− }
27− }
28−
29− @IBInspectable public var maximumValue: Int = 10 {
30− didSet {
31− value = 0
32− }
33− }
34−
35− @IBInspectable public var leftButtonText: String = "-" {
36− didSet {
37− leftButton.setTitle(leftButtonText, forState: [.Normal])
38− }
39− }
40−
41− @IBInspectable public var rightButtonText: String = "+" {
42− didSet {
43− rightButton.setTitle(rightButtonText, forState: [.Normal])
44− }
45− }
46−
47− @IBInspectable public var buttonsTextColor: UIColor = UIColor.whiteColor() {
48− didSet {
49− for button in [leftButton, rightButton] {
50− button.setTitleColor(buttonsTextColor, forState: [.Normal])
51− }
52− }
53− }
54−
55− @IBInspectable public var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1) {
56− didSet {
57− for button in [leftButton, rightButton] {
58− button.backgroundColor = buttonsBackgroundColor
59− }
60− backgroundColor = buttonsBackgroundColor
61− }
62− }
63−
64− public var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)! {
65− didSet {
66− for button in [leftButton, rightButton] {
67− button.titleLabel?.font = buttonsFont
68− }
69− }
70− }
71−
72− @IBInspectable public var labelTextColor: UIColor = UIColor.whiteColor() {
73− didSet {
74− label.textColor = labelTextColor
75− }
76− }
77−
78− @IBInspectable public var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1) {
79− didSet {
80− label.backgroundColor = labelBackgroundColor
81− }
82− }
83−
84− public var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)! {
85− didSet {
86− label.font = labelFont
87− }
88− }
89−
90− @IBInspectable public var cornerRadius: CGFloat = 4.0 {
91− didSet {
92− layer.cornerRadius = cornerRadius
93− clipsToBounds = true
94− }
95− }
96−
97− @IBInspectable public var labelWidthWeight: CGFloat = 0.5 {
98− didSet {
99− labelWidthWeight = min(1, max(0, labelWidthWeight))
100− setNeedsLayout()
101− }
102− }
103−
104− private let labelSlideLength: CGFloat = 5
105− private let labelSlideDuration: NSTimeInterval = 0.1
106−
107− private let limitHitAnimationDuration: NSTimeInterval = 0.1
108− @IBInspectable public var limitHitAnimationColor: UIColor = UIColor(red:0.23, green:0.3, blue:0.51, alpha:1)
109−
110− private let leftButton = UIButton()
111− private let rightButton = UIButton()
112− private let label = UILabel()
113−
114− required public init(coder aDecoder: NSCoder) {
115− super.init(coder: aDecoder)
116− setup()
117− }
118−
119− public override init(frame: CGRect) {
120− super.init(frame: frame)
121− setup()
122− }
123−
124− private func setup() {
125− leftButton.setTitle(leftButtonText, forState: [.Normal])
126− leftButton.setTitleColor(buttonsTextColor, forState: [.Normal])
127− leftButton.backgroundColor = buttonsBackgroundColor
128− leftButton.titleLabel?.font = buttonsFont
129− leftButton.addTarget(self, action: "leftButtonTapped:", forControlEvents: .TouchDown)
130− addSubview(leftButton)
131−
132− rightButton.setTitle(rightButtonText, forState: [.Normal])
133− rightButton.setTitleColor(buttonsTextColor, forState: [.Normal])
134− rightButton.backgroundColor = buttonsBackgroundColor
135− rightButton.titleLabel?.font = buttonsFont
136− rightButton.addTarget(self, action: "rightButtonTapped:", forControlEvents: .TouchDown)
137− addSubview(rightButton)
138−
139− label.textAlignment = .Center
140− label.text = String(value)
141− label.textColor = labelTextColor
142− label.backgroundColor = labelBackgroundColor
143− label.font = labelFont
144− addSubview(label)
145−
146− backgroundColor = buttonsBackgroundColor
147− layer.cornerRadius = cornerRadius
148− clipsToBounds = true
149− }
150−
151− public override func layoutSubviews() {
152− let buttonWidth = bounds.size.width * ((1 - labelWidthWeight) / 2)
153− let labelWidth = bounds.size.width * labelWidthWeight
154−
155− leftButton.frame = CGRect(x: 0, y: 0, width: buttonWidth, height: bounds.size.height)
156− label.frame = CGRect(x: buttonWidth, y: 0, width: labelWidth, height: bounds.size.height)
157− rightButton.frame = CGRect(x: labelWidth + buttonWidth, y: 0, width: buttonWidth, height: bounds.size.height)
158− }
159−
160− @objc private func leftButtonTapped(button: UIButton) {
161− if value == minimumValue {
162− animateLimitHitForButton(leftButton)
163− } else {
164− value -= 1
165− animateSlideLeft()
166− }
167− }
168−
169− @objc private func rightButtonTapped(button: UIButton) {
170− if value == maximumValue {
171− animateLimitHitForButton(rightButton)
172− } else {
173− value += 1
174− animateSlideRight()
175− }
176− }
177−
178− private func animateSlideLeft() {
179− UIView.animateWithDuration(labelSlideDuration, animations: {
180− self.label.center.x -= self.labelSlideLength
181− }, completion: { _ in
182− UIView.animateWithDuration(self.labelSlideDuration, animations: {
183− self.label.center.x += self.labelSlideLength
184− })
185− })
186− }
187−
188− private func animateSlideRight() {
189− UIView.animateWithDuration(labelSlideDuration, animations: {
190− self.label.center.x += self.labelSlideLength
191− }, completion: { _ in
192− UIView.animateWithDuration(self.labelSlideDuration, animations: {
193− self.label.center.x -= self.labelSlideLength
194− })
195− })
196− }
197−
198− private func animateLimitHitForButton(button: UIButton){
199− UIView.animateWithDuration(limitHitAnimationDuration, animations: {
200− button.backgroundColor = self.limitHitAnimationColor
201− }, completion: { _ in
202− button.backgroundColor = self.buttonsBackgroundColor
203− })
204− }
205−}
GMStepper/GMStepper/ViewController.swiftdeleted−24
@@ -1,24 +0,0 @@
1−//
2−// ViewController.swift
3−// GMStepper
4−//
5−// Created by Gunay Mert Karadogan on 1/7/15.
6−// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class ViewController: UIViewController {
12−
13− @IBOutlet weak var stepper: GMStepper!
14−
15− override func viewDidLoad() {
16− super.viewDidLoad()
17− stepper.addTarget(self, action: "stepperValueChanged:", forControlEvents: .ValueChanged)
18− }
19−
20− func stepperValueChanged(stepper: GMStepper) {
21− print(stepper.value)
22− }
23−}
24−
GMStepper/GMStepperTests/GMStepperTests.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// GMStepperTests.swift
3−// GMStepperTests
4−//
5−// Created by Gunay Mert Karadogan on 1/7/15.
6−// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
7−//
8−
9−import XCTest
10−
11−class GMStepperTests: XCTestCase {
12−
13− override func setUp() {
14− super.setUp()
15− // Put setup code here. This method is called before the invocation of each test method in the class.
16− }
17−
18− override func tearDown() {
19− // Put teardown code here. This method is called after the invocation of each test method in the class.
20− super.tearDown()
21− }
22−
23− func testExample() {
24− // This is an example of a functional test case.
25− // Use XCTAssert and related functions to verify your tests produce the correct results.
26− }
27−
28− func testPerformanceExample() {
29− // This is an example of a performance test case.
30− self.measureBlock() {
31− // Put the code you want to measure the time of here.
32− }
33− }
34−
35−}
GMStepper/GMStepperUITests/GMStepperUITests.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// GMStepperUITests.swift
3−// GMStepperUITests
4−//
5−// Created by Gunay Mert Karadogan on 1/7/15.
6−// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
7−//
8−
9−import Foundation
10−import XCTest
11−
12−class GMStepperUITests: XCTestCase {
13−
14− override func setUp() {
15− super.setUp()
16−
17− // Put setup code here. This method is called before the invocation of each test method in the class.
18−
19− // In UI tests it is usually best to stop immediately when a failure occurs.
20− continueAfterFailure = false
21− // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
22− XCUIApplication().launch()
23− }
24−
25− override func tearDown() {
26− // Put teardown code here. This method is called after the invocation of each test method in the class.
27− super.tearDown()
28− }
29−
30− func testExample() {
31− // Use recording to get started writing UI tests.
32− // Use XCTAssert and related functions to verify your tests produce the correct results.
33− }
34−
35−}
GMStepper/GMStepperUITests/Info.plistdeleted−24
@@ -1,24 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3−<plist version="1.0">
4−<dict>
5− <key>CFBundleDevelopmentRegion</key>
6− <string>en</string>
7− <key>CFBundleExecutable</key>
8− <string>$(EXECUTABLE_NAME)</string>
9− <key>CFBundleIdentifier</key>
10− <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11− <key>CFBundleInfoDictionaryVersion</key>
12− <string>6.0</string>
13− <key>CFBundleName</key>
14− <string>$(PRODUCT_NAME)</string>
15− <key>CFBundlePackageType</key>
16− <string>BNDL</string>
17− <key>CFBundleShortVersionString</key>
18− <string>1.0</string>
19− <key>CFBundleSignature</key>
20− <string>????</string>
21− <key>CFBundleVersion</key>
22− <string>1</string>
23−</dict>
24−</plist>
GMStepperExample/GMStepperExample.xcodeproj/project.pbxprojnew file+469
@@ -0,0 +1,469 @@
1+// !$*UTF8*$!
2+{
3+ archiveVersion = 1;
4+ classes = {
5+ };
6+ objectVersion = 46;
7+ objects = {
8+
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 */; };
12+ 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19371B4843EB005EFEE5 /* AppDelegate.swift */; };
13+ 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C19391B4843EB005EFEE5 /* ViewController.swift */; };
14+ 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 319C193B1B4843EB005EFEE5 /* Main.storyboard */; };
15+ 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 319C193E1B4843EB005EFEE5 /* Images.xcassets */; };
16+ 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */; };
17+ 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 319C195B1B48445E005EFEE5 /* GMStepper.swift */; };
18+/* End PBXBuildFile section */
19+
20+/* Begin PBXContainerItemProxy section */
21+ 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */ = {
22+ isa = PBXContainerItemProxy;
23+ containerPortal = 319C192A1B4843EB005EFEE5 /* Project object */;
24+ proxyType = 1;
25+ remoteGlobalIDString = 319C19311B4843EB005EFEE5;
26+ remoteInfo = GMStepperExample;
27+ };
28+/* End PBXContainerItemProxy section */
29+
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; };
35+ 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>"; };
37+ 319C19391B4843EB005EFEE5 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
38+ 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>"; };
40+ 319C19411B4843EB005EFEE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
41+ 319C195B1B48445E005EFEE5 /* GMStepper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GMStepper.swift; sourceTree = "<group>"; };
42+/* End PBXFileReference section */
43+
44+/* Begin PBXFrameworksBuildPhase section */
45+ 3116C0D51DA4DD360015AC69 /* Frameworks */ = {
46+ isa = PBXFrameworksBuildPhase;
47+ buildActionMask = 2147483647;
48+ files = (
49+ );
50+ runOnlyForDeploymentPostprocessing = 0;
51+ };
52+ 319C192F1B4843EB005EFEE5 /* Frameworks */ = {
53+ isa = PBXFrameworksBuildPhase;
54+ buildActionMask = 2147483647;
55+ files = (
56+ );
57+ runOnlyForDeploymentPostprocessing = 0;
58+ };
59+/* End PBXFrameworksBuildPhase section */
60+
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 = {
72+ isa = PBXGroup;
73+ children = (
74+ 319C195A1B48445E005EFEE5 /* GMStepper */,
75+ 319C19341B4843EB005EFEE5 /* GMStepperExample */,
76+ 3116C0D91DA4DD360015AC69 /* GMStepperExampleTests */,
77+ 319C19331B4843EB005EFEE5 /* Products */,
78+ );
79+ sourceTree = "<group>";
80+ };
81+ 319C19331B4843EB005EFEE5 /* Products */ = {
82+ isa = PBXGroup;
83+ children = (
84+ 319C19321B4843EB005EFEE5 /* GMStepperExample.app */,
85+ 3116C0D81DA4DD360015AC69 /* GMStepperExampleTests.xctest */,
86+ );
87+ name = Products;
88+ sourceTree = "<group>";
89+ };
90+ 319C19341B4843EB005EFEE5 /* GMStepperExample */ = {
91+ isa = PBXGroup;
92+ children = (
93+ 319C19371B4843EB005EFEE5 /* AppDelegate.swift */,
94+ 319C19391B4843EB005EFEE5 /* ViewController.swift */,
95+ 319C193B1B4843EB005EFEE5 /* Main.storyboard */,
96+ 319C193E1B4843EB005EFEE5 /* Images.xcassets */,
97+ 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */,
98+ 319C19351B4843EB005EFEE5 /* Supporting Files */,
99+ );
100+ path = GMStepperExample;
101+ sourceTree = "<group>";
102+ };
103+ 319C19351B4843EB005EFEE5 /* Supporting Files */ = {
104+ isa = PBXGroup;
105+ children = (
106+ 319C19361B4843EB005EFEE5 /* Info.plist */,
107+ );
108+ name = "Supporting Files";
109+ sourceTree = "<group>";
110+ };
111+ 319C195A1B48445E005EFEE5 /* GMStepper */ = {
112+ isa = PBXGroup;
113+ children = (
114+ 319C195B1B48445E005EFEE5 /* GMStepper.swift */,
115+ );
116+ name = GMStepper;
117+ path = ../GMStepper;
118+ sourceTree = "<group>";
119+ };
120+/* End PBXGroup section */
121+
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+ };
141+ 319C19311B4843EB005EFEE5 /* GMStepperExample */ = {
142+ isa = PBXNativeTarget;
143+ buildConfigurationList = 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */;
144+ buildPhases = (
145+ 319C192E1B4843EB005EFEE5 /* Sources */,
146+ 319C192F1B4843EB005EFEE5 /* Frameworks */,
147+ 319C19301B4843EB005EFEE5 /* Resources */,
148+ );
149+ buildRules = (
150+ );
151+ dependencies = (
152+ );
153+ name = GMStepperExample;
154+ productName = GMStepperExample;
155+ productReference = 319C19321B4843EB005EFEE5 /* GMStepperExample.app */;
156+ productType = "com.apple.product-type.application";
157+ };
158+/* End PBXNativeTarget section */
159+
160+/* Begin PBXProject section */
161+ 319C192A1B4843EB005EFEE5 /* Project object */ = {
162+ isa = PBXProject;
163+ attributes = {
164+ LastSwiftMigration = 0700;
165+ LastSwiftUpdateCheck = 0800;
166+ LastUpgradeCheck = 0900;
167+ ORGANIZATIONNAME = "Gunay Mert Karadogan";
168+ TargetAttributes = {
169+ 3116C0D71DA4DD360015AC69 = {
170+ CreatedOnToolsVersion = 8.0;
171+ LastSwiftMigration = 0900;
172+ ProvisioningStyle = Automatic;
173+ TestTargetID = 319C19311B4843EB005EFEE5;
174+ };
175+ 319C19311B4843EB005EFEE5 = {
176+ CreatedOnToolsVersion = 6.4;
177+ DevelopmentTeam = 289M6XEDV4;
178+ LastSwiftMigration = 0900;
179+ };
180+ };
181+ };
182+ buildConfigurationList = 319C192D1B4843EB005EFEE5 /* Build configuration list for PBXProject "GMStepperExample" */;
183+ compatibilityVersion = "Xcode 3.2";
184+ developmentRegion = English;
185+ hasScannedForEncodings = 0;
186+ knownRegions = (
187+ en,
188+ Base,
189+ );
190+ mainGroup = 319C19291B4843EB005EFEE5;
191+ productRefGroup = 319C19331B4843EB005EFEE5 /* Products */;
192+ projectDirPath = "";
193+ projectRoot = "";
194+ targets = (
195+ 319C19311B4843EB005EFEE5 /* GMStepperExample */,
196+ 3116C0D71DA4DD360015AC69 /* GMStepperExampleTests */,
197+ );
198+ };
199+/* End PBXProject section */
200+
201+/* Begin PBXResourcesBuildPhase section */
202+ 3116C0D61DA4DD360015AC69 /* Resources */ = {
203+ isa = PBXResourcesBuildPhase;
204+ buildActionMask = 2147483647;
205+ files = (
206+ );
207+ runOnlyForDeploymentPostprocessing = 0;
208+ };
209+ 319C19301B4843EB005EFEE5 /* Resources */ = {
210+ isa = PBXResourcesBuildPhase;
211+ buildActionMask = 2147483647;
212+ files = (
213+ 319C193D1B4843EB005EFEE5 /* Main.storyboard in Resources */,
214+ 319C19421B4843EB005EFEE5 /* LaunchScreen.xib in Resources */,
215+ 319C193F1B4843EB005EFEE5 /* Images.xcassets in Resources */,
216+ );
217+ runOnlyForDeploymentPostprocessing = 0;
218+ };
219+/* End PBXResourcesBuildPhase section */
220+
221+/* Begin PBXSourcesBuildPhase section */
222+ 3116C0D41DA4DD360015AC69 /* Sources */ = {
223+ isa = PBXSourcesBuildPhase;
224+ buildActionMask = 2147483647;
225+ files = (
226+ 3116C0DB1DA4DD360015AC69 /* GMStepperExampleTests.swift in Sources */,
227+ 3198AC771DA4DEE500311FB3 /* GMStepper.swift in Sources */,
228+ );
229+ runOnlyForDeploymentPostprocessing = 0;
230+ };
231+ 319C192E1B4843EB005EFEE5 /* Sources */ = {
232+ isa = PBXSourcesBuildPhase;
233+ buildActionMask = 2147483647;
234+ files = (
235+ 319C193A1B4843EB005EFEE5 /* ViewController.swift in Sources */,
236+ 319C195C1B48445E005EFEE5 /* GMStepper.swift in Sources */,
237+ 319C19381B4843EB005EFEE5 /* AppDelegate.swift in Sources */,
238+ );
239+ runOnlyForDeploymentPostprocessing = 0;
240+ };
241+/* End PBXSourcesBuildPhase section */
242+
243+/* Begin PBXTargetDependency section */
244+ 3116C0DE1DA4DD360015AC69 /* PBXTargetDependency */ = {
245+ isa = PBXTargetDependency;
246+ target = 319C19311B4843EB005EFEE5 /* GMStepperExample */;
247+ targetProxy = 3116C0DD1DA4DD360015AC69 /* PBXContainerItemProxy */;
248+ };
249+/* End PBXTargetDependency section */
250+
251+/* Begin PBXVariantGroup section */
252+ 319C193B1B4843EB005EFEE5 /* Main.storyboard */ = {
253+ isa = PBXVariantGroup;
254+ children = (
255+ 319C193C1B4843EB005EFEE5 /* Base */,
256+ );
257+ name = Main.storyboard;
258+ sourceTree = "<group>";
259+ };
260+ 319C19401B4843EB005EFEE5 /* LaunchScreen.xib */ = {
261+ isa = PBXVariantGroup;
262+ children = (
263+ 319C19411B4843EB005EFEE5 /* Base */,
264+ );
265+ name = LaunchScreen.xib;
266+ sourceTree = "<group>";
267+ };
268+/* End PBXVariantGroup section */
269+
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+ };
309+ 319C194F1B4843EB005EFEE5 /* Debug */ = {
310+ isa = XCBuildConfiguration;
311+ buildSettings = {
312+ ALWAYS_SEARCH_USER_PATHS = NO;
313+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
314+ CLANG_CXX_LIBRARY = "libc++";
315+ CLANG_ENABLE_MODULES = YES;
316+ CLANG_ENABLE_OBJC_ARC = YES;
317+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
318+ CLANG_WARN_BOOL_CONVERSION = YES;
319+ CLANG_WARN_COMMA = YES;
320+ CLANG_WARN_CONSTANT_CONVERSION = YES;
321+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322+ CLANG_WARN_EMPTY_BODY = YES;
323+ CLANG_WARN_ENUM_CONVERSION = YES;
324+ CLANG_WARN_INFINITE_RECURSION = YES;
325+ 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;
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;
333+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
334+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
335+ COPY_PHASE_STRIP = NO;
336+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
337+ ENABLE_STRICT_OBJC_MSGSEND = YES;
338+ ENABLE_TESTABILITY = YES;
339+ GCC_C_LANGUAGE_STANDARD = gnu99;
340+ GCC_DYNAMIC_NO_PIC = NO;
341+ GCC_NO_COMMON_BLOCKS = YES;
342+ GCC_OPTIMIZATION_LEVEL = 0;
343+ GCC_PREPROCESSOR_DEFINITIONS = (
344+ "DEBUG=1",
345+ "$(inherited)",
346+ );
347+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
348+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
349+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
350+ GCC_WARN_UNDECLARED_SELECTOR = YES;
351+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352+ GCC_WARN_UNUSED_FUNCTION = YES;
353+ GCC_WARN_UNUSED_VARIABLE = YES;
354+ IPHONEOS_DEPLOYMENT_TARGET = 8.4;
355+ MTL_ENABLE_DEBUG_INFO = YES;
356+ ONLY_ACTIVE_ARCH = YES;
357+ SDKROOT = iphoneos;
358+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
359+ };
360+ name = Debug;
361+ };
362+ 319C19501B4843EB005EFEE5 /* Release */ = {
363+ isa = XCBuildConfiguration;
364+ buildSettings = {
365+ ALWAYS_SEARCH_USER_PATHS = NO;
366+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
367+ CLANG_CXX_LIBRARY = "libc++";
368+ CLANG_ENABLE_MODULES = YES;
369+ CLANG_ENABLE_OBJC_ARC = YES;
370+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
371+ CLANG_WARN_BOOL_CONVERSION = YES;
372+ CLANG_WARN_COMMA = YES;
373+ CLANG_WARN_CONSTANT_CONVERSION = YES;
374+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
375+ CLANG_WARN_EMPTY_BODY = YES;
376+ CLANG_WARN_ENUM_CONVERSION = YES;
377+ CLANG_WARN_INFINITE_RECURSION = YES;
378+ 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;
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;
386+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
387+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
388+ COPY_PHASE_STRIP = NO;
389+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
390+ ENABLE_NS_ASSERTIONS = NO;
391+ ENABLE_STRICT_OBJC_MSGSEND = YES;
392+ GCC_C_LANGUAGE_STANDARD = gnu99;
393+ GCC_NO_COMMON_BLOCKS = YES;
394+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
395+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
396+ GCC_WARN_UNDECLARED_SELECTOR = YES;
397+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
398+ GCC_WARN_UNUSED_FUNCTION = YES;
399+ GCC_WARN_UNUSED_VARIABLE = YES;
400+ IPHONEOS_DEPLOYMENT_TARGET = 8.4;
401+ MTL_ENABLE_DEBUG_INFO = NO;
402+ SDKROOT = iphoneos;
403+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
404+ VALIDATE_PRODUCT = YES;
405+ };
406+ name = Release;
407+ };
408+ 319C19521B4843EB005EFEE5 /* Debug */ = {
409+ isa = XCBuildConfiguration;
410+ buildSettings = {
411+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
412+ DEVELOPMENT_TEAM = 289M6XEDV4;
413+ INFOPLIST_FILE = GMStepperExample/Info.plist;
414+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
415+ PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
416+ PRODUCT_NAME = "$(TARGET_NAME)";
417+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
418+ SWIFT_VERSION = 4.0;
419+ };
420+ name = Debug;
421+ };
422+ 319C19531B4843EB005EFEE5 /* Release */ = {
423+ isa = XCBuildConfiguration;
424+ buildSettings = {
425+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
426+ DEVELOPMENT_TEAM = 289M6XEDV4;
427+ INFOPLIST_FILE = GMStepperExample/Info.plist;
428+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
429+ PRODUCT_BUNDLE_IDENTIFIER = "com.gunaymert.$(PRODUCT_NAME:rfc1034identifier)";
430+ PRODUCT_NAME = "$(TARGET_NAME)";
431+ SWIFT_SWIFT3_OBJC_INFERENCE = Default;
432+ SWIFT_VERSION = 4.0;
433+ };
434+ name = Release;
435+ };
436+/* End XCBuildConfiguration section */
437+
438+/* 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" */ = {
449+ isa = XCConfigurationList;
450+ buildConfigurations = (
451+ 319C194F1B4843EB005EFEE5 /* Debug */,
452+ 319C19501B4843EB005EFEE5 /* Release */,
453+ );
454+ defaultConfigurationIsVisible = 0;
455+ defaultConfigurationName = Release;
456+ };
457+ 319C19511B4843EB005EFEE5 /* Build configuration list for PBXNativeTarget "GMStepperExample" */ = {
458+ isa = XCConfigurationList;
459+ buildConfigurations = (
460+ 319C19521B4843EB005EFEE5 /* Debug */,
461+ 319C19531B4843EB005EFEE5 /* Release */,
462+ );
463+ defaultConfigurationIsVisible = 0;
464+ defaultConfigurationName = Release;
465+ };
466+/* End XCConfigurationList section */
467+ };
468+ rootObject = 319C192A1B4843EB005EFEE5 /* Project object */;
469+}
GMStepper/GMStepper.xcodeproj/project.xcworkspace/contents.xcworkspacedata → GMStepperExample/GMStepperExample.xcodeproj/project.xcworkspace/contents.xcworkspacedatarenamed+1−1
@@ -2,6 +2,6 @@
22<Workspace
33 version = "1.0">
44 <FileRef
5− location = "self:GMStepper.xcodeproj">
5+ location = "self:GMStepperExample.xcodeproj">
66 </FileRef>
77</Workspace>
GMStepper/GMStepper/AppDelegate.swift → GMStepperExample/GMStepperExample/AppDelegate.swiftrenamed+13−13
@@ -1,9 +1,9 @@
11//
22// AppDelegate.swift
3−// GMStepper
3+// GMStepperExample
44//
5−// Created by Gunay Mert Karadogan on 1/7/15.
6−// Copyright © 2015 Gunay Mert Karadogan. All rights reserved.
5+// Created by Gunay Mert Karadogan on 4/7/15.
6+// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
77//
88
99import UIKit
@@ -14,33 +14,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414 var window: UIWindow?
1515
1616
17− func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1818 // Override point for customization after application launch.
1919 return true
2020 }
2121
22− func applicationWillResignActive(application: UIApplication) {
22+ func applicationWillResignActive(_ application: UIApplication) {
2323 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24− // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
24+ // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
2525 }
2626
27− func applicationDidEnterBackground(application: UIApplication) {
27+ func applicationDidEnterBackground(_ application: UIApplication) {
2828 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
2929 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3030 }
3131
32− func applicationWillEnterForeground(application: UIApplication) {
33− // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
32+ func applicationWillEnterForeground(_ application: UIApplication) {
33+ // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
3434 }
3535
36− func applicationDidBecomeActive(application: UIApplication) {
36+ func applicationDidBecomeActive(_ application: UIApplication) {
3737 // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
3838 }
3939
40− func applicationWillTerminate(application: UIApplication) {
40+ func applicationWillTerminate(_ application: UIApplication) {
4141 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4242 }
43−
44−
43+
44+
4545}
4646
GMStepperExample/GMStepperExample/Base.lproj/LaunchScreen.xibnew file+45
@@ -0,0 +1,45 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+ <dependencies>
4+ <deployment identifier="iOS"/>
5+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
6+ <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
7+ </dependencies>
8+ <objects>
9+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
10+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
11+ <view contentMode="scaleToFill" id="iN0-l3-epB">
12+ <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
13+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
14+ <subviews>
15+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
16+ <rect key="frame" x="20" y="439" width="441" height="21"/>
17+ <animations/>
18+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
19+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
20+ <nil key="highlightedColor"/>
21+ </label>
22+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GMStepperExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
23+ <rect key="frame" x="20" y="140" width="441" height="43"/>
24+ <animations/>
25+ <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
26+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
27+ <nil key="highlightedColor"/>
28+ </label>
29+ </subviews>
30+ <animations/>
31+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
32+ <constraints>
33+ <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
34+ <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
35+ <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
36+ <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
37+ <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
38+ <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
39+ </constraints>
40+ <nil key="simulatedStatusBarMetrics"/>
41+ <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
42+ <point key="canvasLocation" x="548" y="455"/>
43+ </view>
44+ </objects>
45+</document>
GMStepper/GMStepper/Base.lproj/Main.storyboard → GMStepperExample/GMStepperExample/Base.lproj/Main.storyboardrenamed+114−99
@@ -1,175 +1,190 @@
11<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8121.20" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
33 <dependencies>
4− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.16"/>
4+ <deployment identifier="iOS"/>
5+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
6+ <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
7+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
58 </dependencies>
69 <scenes>
710 <!--View Controller-->
8− <scene sceneID="tne-QT-ifu">
11+ <scene sceneID="ufC-wZ-h7g">
912 <objects>
10− <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="GMStepper" customModuleProvider="target" sceneMemberID="viewController">
13+ <viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="GMStepperExample" customModuleProvider="target" sceneMemberID="viewController">
1114 <layoutGuides>
12− <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
13− <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
15+ <viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
16+ <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
1417 </layoutGuides>
15− <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
16− <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+ <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
19+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
20+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1821 <subviews>
19− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="myb-yU-Jdq" customClass="GMStepper" customModule="GMStepper" customModuleProvider="target">
20− <rect key="frame" x="158" y="28" width="284" height="44"/>
21− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
22+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AU6-4C-B2F" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
23+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2224 <constraints>
23− <constraint firstAttribute="width" constant="284" id="Mpe-wq-yrp"/>
24− <constraint firstAttribute="height" constant="44" id="mzJ-k6-SLm"/>
25+ <constraint firstAttribute="height" constant="44" id="6mC-hP-wFD"/>
2526 </constraints>
2627 <userDefinedRuntimeAttributes>
27− <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
28− <real key="value" value="4"/>
28+ <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
29+ <real key="value" value="25"/>
2930 </userDefinedRuntimeAttribute>
30− <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
31− <real key="value" value="0.5"/>
31+ <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
32+ <real key="value" value="5"/>
3233 </userDefinedRuntimeAttribute>
3334 </userDefinedRuntimeAttributes>
3435 </view>
35− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Aem-Sk-pvA" customClass="GMStepper" customModule="GMStepper" customModuleProvider="target">
36− <rect key="frame" x="140" y="116" width="320" height="60"/>
37− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
36+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="if7-U5-bAM" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
37+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3838 <constraints>
39− <constraint firstAttribute="height" constant="60" id="NCa-j9-NeY"/>
40− <constraint firstAttribute="width" constant="320" id="i5N-tY-sno"/>
39+ <constraint firstAttribute="height" constant="66" id="iQi-6P-vt9"/>
40+ <constraint firstAttribute="width" constant="320" id="ji4-Pf-1fZ"/>
4141 </constraints>
4242 <userDefinedRuntimeAttributes>
43− <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
44− <real key="value" value="4"/>
43+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
44+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4545 </userDefinedRuntimeAttribute>
46− <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
47− <real key="value" value="0.5"/>
46+ <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
47+ <color key="value" red="1" green="0.3591497541" blue="0.36842127060000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4848 </userDefinedRuntimeAttribute>
49− <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
50− <color key="value" red="0.81176470590000005" green="0.94117647059999998" blue="0.61960784310000006" alpha="1" colorSpace="calibratedRGB"/>
49+ <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
50+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5151 </userDefinedRuntimeAttribute>
52− <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
53− <color key="value" red="0.47450980390000003" green="0.74117647060000003" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
52+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
53+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5454 </userDefinedRuntimeAttribute>
55− <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
56− <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="calibratedRGB"/>
55+ <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
56+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
5757 </userDefinedRuntimeAttribute>
58− <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
59− <color key="value" red="0.47450980390000003" green="0.74117647060000003" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
58+ <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
59+ <real key="value" value="0.5"/>
6060 </userDefinedRuntimeAttribute>
6161 </userDefinedRuntimeAttributes>
6262 </view>
63− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uFq-rf-S5i" customClass="GMStepper" customModule="GMStepper" customModuleProvider="target">
64− <rect key="frame" x="200" y="220" width="200" height="44"/>
65− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
63+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R9n-I0-fq7" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
64+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
6665 <constraints>
67− <constraint firstAttribute="height" constant="44" id="D8F-d5-x2b"/>
68− <constraint firstAttribute="width" constant="200" id="cKN-TR-k1c"/>
66+ <constraint firstAttribute="width" constant="200" id="dVu-w0-mf0"/>
67+ <constraint firstAttribute="height" constant="66" id="ie8-vl-NAV"/>
6968 </constraints>
7069 <userDefinedRuntimeAttributes>
71− <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
72− <real key="value" value="4"/>
73− </userDefinedRuntimeAttribute>
74− <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
75− <real key="value" value="0.69999999999999996"/>
76− </userDefinedRuntimeAttribute>
77− <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
78− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
79− </userDefinedRuntimeAttribute>
8070 <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
81− <color key="value" red="0.99607843139999996" green="0.26274509800000001" blue="0.39607843139999999" alpha="1" colorSpace="calibratedRGB"/>
71+ <color key="value" red="0.1819814891" green="0.69426733259999995" blue="0.53024792669999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
72+ </userDefinedRuntimeAttribute>
73+ <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
74+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8275 </userDefinedRuntimeAttribute>
8376 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
84− <color key="value" red="0.98823529409999999" green="0.61568627450000002" blue="0.60392156860000001" alpha="1" colorSpace="calibratedRGB"/>
77+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8578 </userDefinedRuntimeAttribute>
86− <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
87− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
79+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
80+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
81+ </userDefinedRuntimeAttribute>
82+ <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
83+ <color key="value" red="0.6588235294" green="0.85882352939999995" blue="0.6588235294" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8884 </userDefinedRuntimeAttribute>
8985 </userDefinedRuntimeAttributes>
9086 </view>
91− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ryl-G8-03i" customClass="GMStepper" customModule="GMStepper" customModuleProvider="target">
92− <rect key="frame" x="150" y="305" width="300" height="100"/>
93− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
87+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U8X-8Z-7Mo" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
88+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
9489 <constraints>
95− <constraint firstAttribute="height" constant="100" id="0aA-5t-al6"/>
96− <constraint firstAttribute="width" constant="300" id="Cb7-zl-72N"/>
90+ <constraint firstAttribute="height" constant="44" id="aF3-T7-dIP"/>
91+ <constraint firstAttribute="width" constant="200" id="vhP-7K-vOu"/>
9792 </constraints>
9893 <userDefinedRuntimeAttributes>
99− <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
100− <real key="value" value="4"/>
94+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
95+ <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
10196 </userDefinedRuntimeAttribute>
102− <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
103− <real key="value" value="0.5"/>
97+ <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
98+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
99+ </userDefinedRuntimeAttribute>
100+ <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
101+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
104102 </userDefinedRuntimeAttribute>
105103 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
106− <color key="value" red="0.63566479890000005" green="0.66711341430000004" blue="0.6596229925" alpha="1" colorSpace="calibratedRGB"/>
104+ <color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
107105 </userDefinedRuntimeAttribute>
108− <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
109− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
106+ <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
107+ <real key="value" value="0.69999999999999996"/>
110108 </userDefinedRuntimeAttribute>
111− <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
112− <color key="value" red="0.63566479890000005" green="0.66711341430000004" blue="0.6596229925" alpha="1" colorSpace="calibratedRGB"/>
109+ <userDefinedRuntimeAttribute type="string" keyPath="leftButtonText" value="😞"/>
110+ <userDefinedRuntimeAttribute type="string" keyPath="rightButtonText" value="☺️"/>
111+ <userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
112+ <integer key="value" value="0"/>
113113 </userDefinedRuntimeAttribute>
114− <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
115− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
114+ <userDefinedRuntimeAttribute type="color" keyPath="limitHitAnimationColor">
115+ <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
116+ </userDefinedRuntimeAttribute>
117+ <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
118+ <integer key="value" value="100"/>
116119 </userDefinedRuntimeAttribute>
117− <userDefinedRuntimeAttribute type="string" keyPath="leftButtonText" value="👎🏻"/>
118− <userDefinedRuntimeAttribute type="string" keyPath="rightButtonText" value="👍🏻"/>
119120 </userDefinedRuntimeAttributes>
121+ <variation key="default">
122+ <mask key="constraints">
123+ <exclude reference="vhP-7K-vOu"/>
124+ </mask>
125+ </variation>
120126 </view>
121− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hNJ-PC-lVe" customClass="GMStepper" customModule="GMStepper" customModuleProvider="target">
122− <rect key="frame" x="150" y="437" width="300" height="44"/>
123− <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
127+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Ri-Yr-sRs" customClass="GMStepper" customModule="GMStepperExample" customModuleProvider="target">
128+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
124129 <constraints>
125− <constraint firstAttribute="height" constant="44" id="ZfG-6M-HCc"/>
126− <constraint firstAttribute="width" constant="300" id="kJt-sV-X9d"/>
130+ <constraint firstAttribute="width" constant="180" id="dhO-Nd-SFk"/>
131+ <constraint firstAttribute="height" constant="50" id="xPS-vU-cZc"/>
127132 </constraints>
128133 <userDefinedRuntimeAttributes>
134+ <userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
135+ <real key="value" value="10"/>
136+ </userDefinedRuntimeAttribute>
137+ <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
138+ <real key="value" value="1"/>
139+ </userDefinedRuntimeAttribute>
140+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
141+ <real key="value" value="2"/>
142+ </userDefinedRuntimeAttribute>
129143 <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
130144 <real key="value" value="4"/>
131145 </userDefinedRuntimeAttribute>
132− <userDefinedRuntimeAttribute type="number" keyPath="labelWidthWeight">
133− <real key="value" value="0.5"/>
146+ <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
147+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
134148 </userDefinedRuntimeAttribute>
135149 <userDefinedRuntimeAttribute type="color" keyPath="buttonsTextColor">
136− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
150+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
137151 </userDefinedRuntimeAttribute>
138− <userDefinedRuntimeAttribute type="color" keyPath="buttonsBackgroundColor">
139− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
152+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
153+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
140154 </userDefinedRuntimeAttribute>
141155 <userDefinedRuntimeAttribute type="color" keyPath="labelBackgroundColor">
142− <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
156+ <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
143157 </userDefinedRuntimeAttribute>
144158 <userDefinedRuntimeAttribute type="color" keyPath="labelTextColor">
145− <color key="value" red="0.98624199629999998" green="0.77968657019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
159+ <color key="value" red="1" green="0.47058823529999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
146160 </userDefinedRuntimeAttribute>
147− <userDefinedRuntimeAttribute type="string" keyPath="leftButtonText" value="Hate"/>
148− <userDefinedRuntimeAttribute type="string" keyPath="rightButtonText" value="Like"/>
149161 </userDefinedRuntimeAttributes>
150162 </view>
151163 </subviews>
152− <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"/>
153165 <constraints>
154− <constraint firstItem="Aem-Sk-pvA" firstAttribute="top" secondItem="myb-yU-Jdq" secondAttribute="bottom" constant="44" id="QI2-LV-blE"/>
155− <constraint firstItem="Ryl-G8-03i" firstAttribute="centerX" secondItem="uFq-rf-S5i" secondAttribute="centerX" id="TZO-dZ-eHw"/>
156− <constraint firstItem="uFq-rf-S5i" firstAttribute="top" secondItem="Aem-Sk-pvA" secondAttribute="bottom" constant="44" id="Wan-ak-Gdj"/>
157− <constraint firstItem="myb-yU-Jdq" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="afz-uk-cC4"/>
158− <constraint firstItem="Ryl-G8-03i" firstAttribute="top" secondItem="uFq-rf-S5i" secondAttribute="bottom" constant="41" id="bki-di-C0T"/>
159− <constraint firstItem="uFq-rf-S5i" firstAttribute="centerX" secondItem="Aem-Sk-pvA" secondAttribute="centerX" id="cnd-y8-NBQ"/>
160− <constraint firstItem="hNJ-PC-lVe" firstAttribute="top" secondItem="Ryl-G8-03i" secondAttribute="bottom" constant="32" id="g97-bw-MeN"/>
161− <constraint firstItem="Aem-Sk-pvA" firstAttribute="centerX" secondItem="myb-yU-Jdq" secondAttribute="centerX" id="hb4-bg-11m"/>
162− <constraint firstItem="hNJ-PC-lVe" firstAttribute="centerX" secondItem="Ryl-G8-03i" secondAttribute="centerX" id="pMa-sj-wyw"/>
163− <constraint firstItem="myb-yU-Jdq" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="8" id="xo4-e0-e0r"/>
166+ <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"/>
168+ <constraint firstItem="R9n-I0-fq7" firstAttribute="top" secondItem="if7-U5-bAM" secondAttribute="bottom" constant="44" id="7RS-Cp-6bS"/>
169+ <constraint firstAttribute="trailingMargin" secondItem="AU6-4C-B2F" secondAttribute="trailing" constant="8" id="Ed1-QZ-06I"/>
170+ <constraint firstItem="if7-U5-bAM" firstAttribute="centerX" secondItem="AU6-4C-B2F" secondAttribute="centerX" id="FMw-uV-Ohc"/>
171+ <constraint firstItem="if7-U5-bAM" firstAttribute="centerX" secondItem="R9n-I0-fq7" secondAttribute="centerX" id="K7g-rC-ehJ"/>
172+ <constraint firstItem="U8X-8Z-7Mo" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="8" id="S1b-pD-UXA"/>
173+ <constraint firstItem="U8X-8Z-7Mo" firstAttribute="top" secondItem="R9n-I0-fq7" secondAttribute="bottom" constant="44" id="fBW-Xx-pa0"/>
174+ <constraint firstItem="9Ri-Yr-sRs" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="fay-qT-jKR"/>
175+ <constraint firstItem="AU6-4C-B2F" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="8" id="iIM-b2-jzV"/>
176+ <constraint firstItem="9Ri-Yr-sRs" firstAttribute="top" secondItem="U8X-8Z-7Mo" secondAttribute="bottom" constant="44" id="nKi-Fp-8B7"/>
177+ <constraint firstAttribute="trailingMargin" secondItem="U8X-8Z-7Mo" secondAttribute="trailing" constant="8" id="ppd-nb-fL8"/>
178+ <constraint firstItem="AU6-4C-B2F" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="8" symbolic="YES" id="zDK-gF-kms"/>
164179 </constraints>
165180 </view>
166181 <connections>
167− <outlet property="stepper" destination="myb-yU-Jdq" id="B3e-dV-hSv"/>
182+ <outlet property="stepper" destination="AU6-4C-B2F" id="bJ8-mf-9b4"/>
168183 </connections>
169184 </viewController>
170− <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
185+ <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
171186 </objects>
172− <point key="canvasLocation" x="340" y="387"/>
187+ <point key="canvasLocation" x="274" y="363"/>
173188 </scene>
174189 </scenes>
175190</document>
GMStepper/GMStepper/Assets.xcassets/AppIcon.appiconset/Contents.json → GMStepperExample/GMStepperExample/Images.xcassets/AppIcon.appiconset/Contents.jsonrenamed

The content is the same.

GMStepper/GMStepper/Info.plist → GMStepperExample/GMStepperExample/Info.plistrenamed

The content is the same.

GMStepperExample/GMStepperExample/ViewController.swiftnew file+22
@@ -0,0 +1,22 @@
1+//
2+// ViewController.swift
3+// GMStepperExample
4+//
5+// Created by Gunay Mert Karadogan on 4/7/15.
6+// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class ViewController: UIViewController {
12+
13+ @IBOutlet weak var stepper: GMStepper!
14+ override func viewDidLoad() {
15+ super.viewDidLoad()
16+ stepper.addTarget(self, action: #selector(ViewController.stepperValueChanged), for: .valueChanged)
17+ }
18+
19+ @objc func stepperValueChanged(stepper: GMStepper) {
20+ print(stepper.value, terminator: "")
21+ }
22+}
GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swiftnew file+42
@@ -0,0 +1,42 @@
1+//
2+// GMStepperExampleTests.swift
3+// GMStepperExampleTests
4+//
5+// Created by Gunay Mert Karadogan on 4/7/15.
6+// Copyright (c) 2015 Gunay Mert Karadogan. All rights reserved.
7+//
8+
9+import XCTest
10+import UIKit
11+
12+class GMStepperExampleTests: XCTestCase {
13+ var stepper: GMStepper!
14+
15+ override func setUp() {
16+ super.setUp()
17+ stepper = GMStepper()
18+ }
19+
20+ func testDefaults() {
21+ XCTAssert(stepper.minimumValue == 0, "minimumValue defaults 0")
22+ XCTAssert(stepper.maximumValue == 100, "maximumValue defaults to 100")
23+ XCTAssert(stepper.value == 0, "value defaults to 0")
24+ }
25+
26+ func testMinimum_limitsValue() {
27+ stepper.minimumValue = 1
28+ stepper.value = 0
29+
30+ XCTAssert(stepper.value == stepper.minimumValue, "Pass")
31+ }
32+
33+ func testMaximum_limitsValue() {
34+ let stepper = GMStepper()
35+ stepper.maximumValue = 1
36+ stepper.value = 2
37+
38+ XCTAssert(stepper.value == stepper.maximumValue, "Pass")
39+ }
40+
41+
42+}
GMStepper/GMStepperTests/Info.plist → GMStepperExample/GMStepperExampleTests/Info.plistrenamed−2
@@ -16,8 +16,6 @@
1616 <string>BNDL</string>
1717 <key>CFBundleShortVersionString</key>
1818 <string>1.0</string>
19− <key>CFBundleSignature</key>
20− <string>????</string>
2119 <key>CFBundleVersion</key>
2220 <string>1</string>
2321</dict>
README.md+100−1
@@ -1,2 +1,101 @@
11# GMStepper
2−A simple stepper with a label in the middle.
2+[![Version](https://img.shields.io/cocoapods/v/GMStepper.svg?style=flat)](http://cocoapods.org/pods/GMStepper)
3+[![License](https://img.shields.io/cocoapods/l/GMStepper.svg?style=flat)](http://cocoapods.org/pods/GMStepper)
4+[![Platform](https://img.shields.io/cocoapods/p/GMStepper.svg?style=flat)](http://cocoapods.org/pods/GMStepper)
5+
6+A 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+
8+
9+## Screenshot
10+
11+![Screenshot_1.gif](https://raw.githubusercontent.com/gmertk/GMStepper/master/Screenshots/screenshot_1.gif)
12+
13+
14+## Usage
15+
16+GMStepper is available through [CocoaPods](http://cocoapods.org). To install
17+it, simply add the following lines to your Podfile:
18+
19+```ruby
20+use_frameworks!
21+pod "GMStepper"
22+```
23+
24+## Setup
25+
26+If you want to use storyboards, just drop a UIView into your storyboard and set its class to `GMStepper`. Then customize through the attributes inspector. Otherwise, you can write the code to initialize with frame and set the properties.
27+
28+## Properties
29+```swift
30+/// Current value of the stepper. Defaults to 0.
31+var value: Double = 0
32+
33+/// Minimum value. Must be less than maximumValue. Defaults to 0.
34+var minimumValue: Double = 0
35+
36+/// Maximum value. Must be more than minimumValue. Defaults to 100.
37+var maximumValue: Double = 100
38+
39+/// Step/Increment value as in UIStepper. Defaults to 1.
40+var stepValue: Double = 1
41+
42+/// The same as UIStepper's autorepeat. If true, holding on the buttons or keeping the pan gesture alters the value repeatedly. Defaults to true.
43+var autorepeat: Bool = true
44+
45+/// If the value is integer, it is shown without floating point.
46+var showIntegerIfDoubleIsInteger: Bool = true
47+
48+/// Text on the left button. Be sure that it fits in the button. Defaults to "-".
49+var leftButtonText: String = "-"
50+
51+/// Text on the right button. Be sure that it fits in the button. Defaults to "+".
52+var rightButtonText: String = "+"
53+
54+/// Text color of the buttons. Defaults to white
55+var buttonsTextColor: UIColor = UIColor.whiteColor()
56+
57+/// Background color of the buttons. Defaults to dark blue.
58+var buttonsBackgroundColor: UIColor = UIColor(red:0.21, green:0.5, blue:0.74, alpha:1)
59+
60+/// Font of the buttons. Defaults to AvenirNext-Bold, 20.0 points in size.
61+var buttonsFont = UIFont(name: "AvenirNext-Bold", size: 20.0)
62+
63+/// Text color of the middle label. Defaults to white.
64+var labelTextColor: UIColor = UIColor.whiteColor()
65+
66+/// Text color of the middle label. Defaults to lighter blue.
67+var labelBackgroundColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
68+
69+/// Font of the middle label. Defaults to AvenirNext-Bold, 25.0 points in size.
70+var labelFont = UIFont(name: "AvenirNext-Bold", size: 25.0)
71+
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.
76+var cornerRadius: CGFloat = 4.0
77+
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.
85+var labelWidthWeight: CGFloat = 0.5
86+
87+/// Color of the flashing animation on the buttons in case the value hit the limit.
88+var limitHitAnimationColor: UIColor = UIColor(red:0.26, green:0.6, blue:0.87, alpha:1)
89+```
90+
91+
92+## Authors
93+
94+* [Brent Whitman](https://github.com/bwhtmn) - Maintainer
95+* [Günay Mert Karadoğan](https://github.com/gmertk) - Creator
96+
97+## License
98+
99+GMStepper is available under the MIT license. See the LICENSE file for more info.
100+
101+
Screenshots/screenshot_1.gifnew file

Binary file not shown.