Direct Source:
-(void) Transitionwithtype: (nsstring *) type Withsubtype: (nsstring *) subtype Forview: ( UIView *) View
{
// Create catransition object
catransition *animation = [catransition animation];
// Set exercise time
Animation. Duration = 0.7f;
// Set motion type
Animation. type = type;
if (subtype! = Nil) {
// Set sub-class
Animation. subtype = subtype;
}
// Set motion speed
Animation. timingfunction = uiviewanimationoptioncurveeaseinout;
[View. layer addanimation: Animation forkey:@ "animation"];
}
Paste this method after the. You can think about what you want to animate.
typedef Enum : nsuinteger {
Fade = 1, // fade in
Push, // push
Reveal, // uncover
Movein, // overlay
Cube, // cube
Suckeffect, // suck
Oglflip, // Flip
Rippleeffect, // Ripple
Pagecurl, // Flip page
Pageuncurl, // Reverse Paging
Camerairishollowopen, // open lens
Camerairishollowclose, // off lens
Curldown, // next page
Curlup, //page up
Flipfromleft, // Flip left
Flipfromright, // right Flip
} Animationtype;
If this method is written in the parent class. The subclass is called directly.
[Super transitionwithtype:@ "Cude" withsubtype:kcatransitionfromleft Forview:self. Navigationcontroller. View], what effect you can try. Fight.
iOS push present animations