1. What is transition animation?
is to switch from one scene to another, like a navigation controller's push effect, which is a transition.
2. How to create a transition animation
Create a transition animation
Catransition *anim = [catransition animation];
Set Transition type
Anim.type = @ "Cube";
Anim.duration = 1;
Set the direction of a transition
Anim.subtype = Kcatransitionfromleft;
Set the start position of the animation
anim.startprogress = 0.5;
Set the end position of the animation
anim.endprogress = 0.8;
Add an animation.
[_imagev.layer Addanimation:anim Forkey:nil];
The code to perform the animation is called the transition code.
Transition animations are animated with the transition code written in the same method.
3.UIView to animate transitions
[UIView TransitionWithView:self.imageV Duration:1
Options:uiviewanimationoptiontransitionflipfromright
animations:^{
Transition code
} completion:^ (BOOL finished) {
Called when the animation finishes executing.
}];
There are fewer types of transitions using UIView.
SetType: There are four types of:
Kcatransitionfade//cross-fade transitions
Kcatransitionmovein//Mobile overlay Artwork
Kcatransitionpush//New View roll out the old view
Kcatransitionreveal//Bottom showing
Another way to set up
Pagecurl//Turn up one page
Pageuncurl//Turn down one page
Rippleeffect//Drip effect
Suckeffect//shrinkage effect, such as a piece of cloth was pumped away
Cube//Cube effect
Oglflip//up/down rollover effect
The following previous code instance, first on the effect, and then on the code:
iOS ui--transition animation