iOS ui--Transitions Animation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.