iOS screen switching animation effects of the API mainly by calling the system has defined animation effects, these effects have basically included the requirements of development, if the need for more complex results, you can consider catransition to achieve
Here are some of the four basic effects
Kcatransitionpush Push Effect
Kcatransitionmovein Move Effect
Kcatransitionreveal cut off effect
Kcatransitionfade Fade Out effect
The following API effects are safe to use
Cube Box
Suckeffect Triangle
Rippleeffect Wave jitter
Pagecurl on the page
Pageuncurl under the page
Oglflip flip up and down
Camerairishollowopen Lens Shutter Open
Camerairishollowclose Lens Shutter Open
The following API effects should be used with caution
The Speweffect new layout is released in the middle of the screen to cover the old layout.
Genieeffect the old layout is sucked off the lower left or right of the screen, showing the new layout below
Ungenieeffect new layout is released from the bottom left or right below the screen to overwrite the old layout.
The twist layout is turned out in a horizontal direction like a tornado.
The Tubey layout is vertically attached with a flexible turn out.
Swirl old layout 360 degrees rotation and fade out, showing the new layout.
Charminultra the old layout fades out and displays the new layout.
Zoomyin new layout from small amplification to the front, the old layout of the enlarged from the front disappeared.
Zoomyout new layout screen outside the zoom appears, the old layout shrinks disappear.
Oglapplicationsuspend like the effect of pressing the "Home" button.
Use of animation effects
code is as follows |
copy code |
Catransition *animation = [catransition animation]; Animation.duration = 10.5f; Animation.timingfunction = uiviewanimationcurveeaseinout; Animation.fillmode = kcafillmodeforwards; //Basic type Animation.type = Kcatransitionpush; //Private API, String type Animation.type = "Cube"; [self.view.layer addanimation:animation forkey:@ "animation"] ; |