1. Use the uiview function to implement:
// Uiviewanimationtransitionflipfromleft, left
// Uiviewanimationtransitionflipfromright, turn to the right
// Uiviewanimationtransitioncurlup, flip up
// Uiviewanimationtransitioncurldown, flip down
[Uiview beginanimations: @ "animationid" context: Nil];
[Uiview setanimationduration: 0.5f]; // animation duration
[Uiview setanimationcurve: uiviewanimationcurveeaseinout];
[Uiview setanimationtransition: uiviewanimationtransitionflipfromleft forview: Self. View cache: Yes]; // Add a transition effect to the view
// Write your code here.
[Uiview commitanimations]; // submit an animation
2. Use the catransition object to implement:
Catransition is relatively powerful. Generally, you can use catransition to simulate the uiview animation.
/* Transition effect
Fade // cross fade transition (transition direction not supported)
Push // New View releases old view
Movein // move the new view to the old view
Reveal // remove the old view to display the new view below
Cube // cube tumble Effect
Oglflip // top, bottom, left, and right flip
Suckeffect // contraction effect, such as a cloth being drawn (transition direction not supported)
Rippleeffect // drip effect (transition direction not supported)
Pagecurl // page up
Pageuncurl // page flip
Camerairishollowopen // camera lens opening effect (transition direction not supported)
Camerairishollowclose // camera lens close effect (transition direction not supported)
*/
/* Transition direction
Fromright;
Fromleft;
Fromtop;
Frombottom;
*/
Catransition * animation = [catransition animation];
Animation. Delegate = self;
Animation. Duration = 0.5f; // animation duration
Animation. timingfunction = uiviewanimationcurveeaseinout;
Animation. fillmode = kcafillmodeforwards;
Animation. type = @ "cube"; // excessive Effect
Animation. Subtype = @ "formleft"; // transition direction
Animation. startprogress = 0.0 // animation start point (percentage in the overall animation)
Animation. endprogress = 1.0; // animation stop end point (percentage in the overall animation)
Animation. removedoncompletion = no;
[Self. View. layer addanimation: animation forkey: @ "Animation"];
Reference http://www.devdiv.com/home.php? MoD = Space & uid = 8639 & Do = Blog & id = 4143