You should ignore the ivars. They will not help you.
The UIStepper
has a value
property that you can query to figure out what the current value is. So your method could simply be:
- (IBAction)valueChanged:(UIStepper *)sender {
double value = [sender value];
[label setText:[NSString stringWithFormat:@"%d", (int)value]];
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…