Make UIStepper increase increment by 5
Question
Is there a way to make a UIStepper count by 5's rather than a single increment at a time? i.e, tap + and a label says 5, 10, 15, 20, etc. or subtract by 5 every time? So far I have tried value +5;
and that doesn't work. Any help is gladly appreciated. Thanks!
Solution
Do [<insertsteppername> setStepValue:5];
For example:
UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(120,20,0,0)];
[stepper setStepValue:5];
OTHER TIPS
There is an increment setting (called 'step') for the UIStepper - you can find it in the Property Inspector.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow