on master help sign in
Change some vars to let constant
f380fc3Gunay Mert Karadogan
GMStepper.podspec+1−1
@@ -1,6 +1,6 @@
1Pod::Spec.new do |s|
1Pod::Spec.new do |s|
2 s.name = "GMStepper"
2 s.name = "GMStepper"
3− s.version = "1.0.1"
3+ s.version = "1.0.2"
4 s.summary = "A stepper with a sliding label in the middle."
4 s.summary = "A stepper with a sliding label in the middle."
5 s.homepage = "https://github.com/gmertk/GMStepper"
5 s.homepage = "https://github.com/gmertk/GMStepper"
6 s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"
6 s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"
GMStepper/GMStepper.swift+4−4
@@ -233,7 +233,7 @@ import UIKit
233 }
233 }
234 }
234 }
235
235
236− /// Useful for logging the timer interval. You can call this in the timer handler to test the autorepeat option.
236+ /// Useful for logging the timer interval. You can call this in the timer handler to test the autorepeat option. Not used in the current implementation.
237 lazy var printTimerGaps: () -> () = {
237 lazy var printTimerGaps: () -> () = {
238 var prevTime: CFAbsoluteTime?
238 var prevTime: CFAbsoluteTime?
239
239
@@ -303,11 +303,11 @@ extension GMStepper {
303 leftButton.enabled = false
303 leftButton.enabled = false
304 rightButton.enabled = false
304 rightButton.enabled = false
305 case .Changed:
305 case .Changed:
306− var translation = gesture.translationInView(label)
306+ let translation = gesture.translationInView(label)
307 gesture.setTranslation(CGPointZero, inView: label)
307 gesture.setTranslation(CGPointZero, inView: label)
308
308
309− var slidingRight = gesture.velocityInView(label).x > 0
309+ let slidingRight = gesture.velocityInView(label).x > 0
310− var slidingLeft = gesture.velocityInView(label).x < 0
310+ let slidingLeft = gesture.velocityInView(label).x < 0
311
311
312 // Move the label with pan
312 // Move the label with pan
313 if slidingRight {
313 if slidingRight {
GMStepperExample/GMStepperExample/Base.lproj/Main.storyboard+1−1
@@ -56,7 +56,7 @@
56 <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
56 <color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
57 </userDefinedRuntimeAttribute>
57 </userDefinedRuntimeAttribute>
58 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
58 <userDefinedRuntimeAttribute type="number" keyPath="stepValue">
59− <real key="value" value="0.69999999999999996"/>
59+ <real key="value" value="0.5"/>
60 </userDefinedRuntimeAttribute>
60 </userDefinedRuntimeAttribute>
61 </userDefinedRuntimeAttributes>
61 </userDefinedRuntimeAttributes>
62 </view>
62 </view>
GMStepperExample/GMStepperExampleTests/GMStepperExampleTests.swift+1−1
@@ -19,7 +19,7 @@ class GMStepperExampleTests: XCTestCase {
19
19
20 func testDefaults() {
20 func testDefaults() {
21 XCTAssert(stepper.minimumValue == 0, "minimumValue defaults 0")
21 XCTAssert(stepper.minimumValue == 0, "minimumValue defaults 0")
22− XCTAssert(stepper.maximumValue == 10, "maximumValue defaults to 10")
22+ XCTAssert(stepper.maximumValue == 100, "maximumValue defaults to 100")
23 XCTAssert(stepper.value == 0, "value defaults to 0")
23 XCTAssert(stepper.value == 0, "value defaults to 0")
24 }
24 }
25
25