views:

126

answers:

1

I use the following code to animate a flip transition on a view:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self.view addSubview:anotherViewController.view];
[UIView commitAnimations];

However, when I switch to this view (self.view in the code snippet above) inside a UIPageViewController, the view flips instead of sliding in from the left or right.

How can I "unset" this animation transition once the view has flipped? I tried calling [self.view.layer removeAllAnimations] after the transition is complete but it has no effect.

A: 

I determined that the function performing the animation was being called by a notification callback when the page view's current page was changed. Hopefully someone else will benefit from this answer in realizing that animations settings are discarded a the end of an animation block (any code between [UIView beginAnimation] and [UIView commitAnimation]).

titaniumdecoy