I see what seems to be the interaction between the individual animations, and I am very grateful for any suggestions to eliminate this effect.
Basically: I have an iPhone app that includes an βaβ button in the root view. Pressing "a" calls up the view on the controller stack of the navigation view with flip animation. The extended view has a button to display the view back to the root.
Main code:
- (IBAction)pushOneView{
TheAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight
forView:delegate.navigationController.view cache:NO];
[delegate.navigationController
pushViewController:oneViewController animated:NO];
[UIView commitAnimations];
}
This seems like normal, and the animation is pretty smooth.
The root view also includes a preview ("panelView") and another button "b". panelView can display either of the other two sub-items - by pressing "b" swaps between these subzones, with rotation animations. Code:
-(IBAction)swapPanels{
UIViewController *coming;
UIViewController *going;
float rotation;
if (self.aPanel.view.superview == nil) {
coming = aPanel;
going = bPanel;
rotation = 3.14;
}
else {
coming = bPanel;
going = aPanel;
rotation = -3.14;
}
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
CGAffineTransform swirlTransform = CGAffineTransformMakeRotation(rotation);
panelView.transform = swirlTransform;
[panelView setAlpha:0.1];
[UIView commitAnimations];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
CGAffineTransform secondTransform =
CGAffineTransformRotate(swirlTransform, rotation);
panelView.transform = secondTransform;
[panelView setAlpha:1];
[UIView commitAnimations];
[going.view removeFromSuperview];
[panelView insertSubview:coming.view atIndex:0];
}
. .
, "a" , "b" .
, , "a" , . "b" . "a" ... "a" , .
100% . , .
- .
"b" ( ), "a" "sw" "b" .
, .
"a" , "b" , , , , ( ).
, : . "a" , "b" - - , "b" . , ? ? ...?
.