I have a UIPickerView and I would like to be notified when the selectRow animation is done.
I tried the following approach in my view controller which has a reference to the UIPickerView and it won't work:
-(void)viewDidLoad { ...
[UIPickerView setAnimationDelegate:self];
[UIPickerView setAnimationDidStopSelector:@selector(animationFin ished:finished:context]; ...
}
- (void)animationFinishedNSString *)animationID finishedBOOL)finished contextvoid *)context {
if (finished) {
}
}
Then somewhere in my code, I initiate the animation:
[picker selectRow:random() % pickerDataCount inComponent:0 animated:YES];