I am stumped by a very simple task, I want a UIView animation to do ease in / ease out but it is always linear despite using the correct animationOption.
Here is the code which by all accounts should work, it's set in a UIViewControllerAnimatedTransitioning class but I have the same issue in a previous custom segue class;
[UIView animateWithDuration:0.4f delay:0.0f options:UIViewAnimationOptionCurveEaseInOut animations:^(void) {
self.dimView.alpha = 1.0;
self.imageView.frame = self.destinationRect;
} completion:^(BOOL finished) {
[self.imageView removeFromSuperview];
[self.dimView removeFromSuperview];
[transitionContext completeTransition:YES];
}];
However, a spring animation with the following code works although I'd rather not do this.
[UIView animateWithDuration:0.8f delay:0 usingSpringWithDamping:0.7f initialSpringVelocity:2.0f options:UIViewAnimationOptionCurveEaseInOut animations:^(void) {
self.dimView.alpha = 1.0;
self.imageView.frame = self.destinationRect;
} completion:^(BOOL finished){
[self.imageView removeFromSuperview];
[self.dimView removeFromSuperview];
[transitionContext completeTransition:YES];
}];
I'm getting the same behaviour on the simulator and on an iPad2 test device. Am I doing something wrong? Are there issues with animating either frame or alpha values?