From 0205e53da31bf2d605d2a8652ac66bf2634372d6 Mon Sep 17 00:00:00 2001 From: Xavier Schott Date: Sat, 5 Dec 2015 23:21:27 -0800 Subject: [PATCH] Added Stepper to TGPControlsDemo7 to demonstrate bug fix #14 --- .../TGPControlsDemo7/Base.lproj/Main.storyboard | 13 +++++++++++-- TGPControlsDemo7/TGPControlsDemo7/ViewController.m | 10 +++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard b/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard index 95bffb8..0411c42 100644 --- a/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard +++ b/TGPControlsDemo7/TGPControlsDemo7/Base.lproj/Main.storyboard @@ -332,7 +332,7 @@ - + @@ -390,6 +390,12 @@ + + + + + + @@ -401,6 +407,8 @@ + + @@ -413,6 +421,7 @@ + @@ -434,7 +443,6 @@ - @@ -465,6 +473,7 @@ + diff --git a/TGPControlsDemo7/TGPControlsDemo7/ViewController.m b/TGPControlsDemo7/TGPControlsDemo7/ViewController.m index 04cdc04..0a59a8a 100644 --- a/TGPControlsDemo7/TGPControlsDemo7/ViewController.m +++ b/TGPControlsDemo7/TGPControlsDemo7/ViewController.m @@ -51,6 +51,7 @@ @property (weak, nonatomic) IBOutlet UILabel *controlEventsLabel; @property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *dualColorSlider; +@property (weak, nonatomic) IBOutlet UIStepper *stepper; @end @implementation ViewController @@ -121,8 +122,15 @@ - (void)touchCancel:(UIControl *)sender event:(UIEvent *)event { self.controlEventsLabel.text = @"touchCancel"; } -- (void)valueChanged:(UIControl *)sender event:(UIEvent *)event { +- (void)valueChanged:(TGPDiscreteSlider7 *)sender event:(UIEvent *)event { self.controlEventsLabel.text = @"valueChanged"; + self.stepper.value = (double) sender.value; +} + +#pragma mark - UIStepper + +- (IBAction)stepperValueChanged:(UIStepper *)sender { + self.dualColorSlider.value = (CGFloat) sender.value; } @end \ No newline at end of file