You can, instead of addTarget:action, observe the steppers value property and ask to receive both old and new value in the change dictionary
{
UIStepper *stepper = ...;
[stepper addObserver:self forKeyPath:@"value"
options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew
context:0];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if (object == stepper) {
double oldValue = change[NSKeyValueChangeOldKey];
double newValue = change[NSKeyValueChangeNewKey];
double change = newValue - oldValue;
}
}
or subclass UIStepper and do the calculation in an overridden -setValue: