In the code below, do I need to cast sender to UISlider? I can't really see the reason as sender is a UISlider object anyways?
-(IBAction)sliderChangeGoat:(id)sender {
UISlider *slider = sender; // OR UISlider *slider = (UISlider*)sender;
NSString *newText = [[NSString alloc] initWithFormat:@"%d", (int)[slider value]];
[sliderLabel_003 setText:newText];
if((int)[slider value] > 0) [goatLabel setText:@"Goats:"];
} else [goatLabel setText:@"None:"];
[newText release];
}
EDIT_001:
Thats what I was thinking (@chuck), do you mean? I was not sure if it was bad form to change the name sender?
-(IBAction)sliderChangeGoat:(UISlider*)slider {
}
many thanks
gary