diff --git a/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard b/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard index 79a1f95..aff9f63 100644 --- a/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard +++ b/TGPControlsDemo/TGPControlsDemo/Base.lproj/Main.storyboard @@ -331,22 +331,6 @@ - - - - - - - - - - - - - - - - @@ -390,6 +374,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -401,6 +407,7 @@ + @@ -419,6 +426,7 @@ + @@ -432,10 +440,16 @@ + + + + + + @@ -465,6 +479,7 @@ + diff --git a/TGPControlsDemo/TGPControlsDemo/ViewController.swift b/TGPControlsDemo/TGPControlsDemo/ViewController.swift index 1e03812..349679d 100644 --- a/TGPControlsDemo/TGPControlsDemo/ViewController.swift +++ b/TGPControlsDemo/TGPControlsDemo/ViewController.swift @@ -46,6 +46,7 @@ class ViewController: UIViewController { @IBOutlet weak var controlEventsLabel: UILabel! @IBOutlet weak var dualColorSlider: TGPDiscreteSlider! + @IBOutlet weak var stepper: UIStepper! override func viewDidLoad() { super.viewDidLoad() @@ -85,6 +86,7 @@ class ViewController: UIViewController { } // MARK: - UIControlEvents + func touchDown(sender: UIControl, event:UIEvent) { self.controlEventsLabel.text = "touchDown" } @@ -112,8 +114,15 @@ class ViewController: UIViewController { func touchCancel(sender: UIControl, event:UIEvent) { self.controlEventsLabel.text = "touchCancel" } - func valueChanged(sender: UIControl, event:UIEvent) { + func valueChanged(sender: TGPDiscreteSlider, event:UIEvent) { self.controlEventsLabel.text = "valueChanged" + self.stepper.value = Double(sender.value) + } + + // MARK: - UIStepper + + @IBAction func stepperValueChanged(sender: UIStepper) { + self.dualColorSlider.value = CGFloat(sender.value) } }