Change some vars to let constant

This commit is contained in:
Gunay Mert Karadogan 2015-07-17 19:24:18 +02:00
parent ed34ebf37b
commit f380fc31d0
4 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "GMStepper"
s.version = "1.0.1"
s.version = "1.0.2"
s.summary = "A stepper with a sliding label in the middle."
s.homepage = "https://github.com/gmertk/GMStepper"
s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/screenshot_1.png"

View File

@ -233,7 +233,7 @@ import UIKit
}
}
/// Useful for logging the timer interval. You can call this in the timer handler to test the autorepeat option.
/// 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.
lazy var printTimerGaps: () -> () = {
var prevTime: CFAbsoluteTime?
@ -303,11 +303,11 @@ extension GMStepper {
leftButton.enabled = false
rightButton.enabled = false
case .Changed:
var translation = gesture.translationInView(label)
let translation = gesture.translationInView(label)
gesture.setTranslation(CGPointZero, inView: label)
var slidingRight = gesture.velocityInView(label).x > 0
var slidingLeft = gesture.velocityInView(label).x < 0
let slidingRight = gesture.velocityInView(label).x > 0
let slidingLeft = gesture.velocityInView(label).x < 0
// Move the label with pan
if slidingRight {

View File

@ -56,7 +56,7 @@
<color key="value" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="stepValue">
<real key="value" value="0.69999999999999996"/>
<real key="value" value="0.5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>

View File

@ -19,7 +19,7 @@ class GMStepperExampleTests: XCTestCase {
func testDefaults() {
XCTAssert(stepper.minimumValue == 0, "minimumValue defaults 0")
XCTAssert(stepper.maximumValue == 10, "maximumValue defaults to 10")
XCTAssert(stepper.maximumValue == 100, "maximumValue defaults to 100")
XCTAssert(stepper.value == 0, "value defaults to 0")
}