Hi,
I'm using multiple UISliders on a form, and I want just one method to keep track of slider changes.
Now I have a method:
- (IBAction) slider1ValueChanged:(UISlider *)sender {
somelabel.text = [NSString stringWithFormat:@" %.1f", [sender value]];
}
But because I use multiple sliders, I want to use a switch statement to fire for a particular slider, so for example if I have 2 sliders, and they both use the above ValueChanged method, I want something like:
- (IBAction) slider1ValueChanged:(UISlider *)sender {
switch(SLIDERID)
case SLIDER1:
blabla;
break;
case SLIDER2:
update other label;
break;
case default:
break;
somelabel.text = [NSString stringWithFormat:@" %.1f", [sender value]];
}
Who can help me?
Thanks in advance!