Summary of how iOS animations are used

Source: Internet
Author: User

First Kind

Catransition *transition = [catransition animation];        Transition.duration = 0.4f;//time        transition.type = kcatransitionpush;//animation effect        Transition.subtype = kcatransitionfrombottom;//animation Destination        [Self.view addsubview:_backgroundview];//This is the thing to do is to add a view that needs to write        on its own [Self.view.layer addanimation:transition forkey:@ "animation"];

The second Kind

[UIView beginanimations:@ "animation" context:nil];        [UIView setanimationduration:2.0f];//time        [UIView setanimationcurve:uiviewanimationcurveeaseinout];//effect        [ UIView setanimationtransition:uiviewanimationtransitionnone ForView:self.view Cache:yes];        [Self.view addsubview:_backgroundview];//to do        [UIView commitanimations];

Third Kind

            [UIView animatewithduration:1.0 animations:^{            _backgroundview.frame = CGRectMake (0, Originy, _screensize.width, 0 );//The status value to be reached              }completion:^ (BOOL finished) {                [_backgroundview Removefromsuperview];            }];

To summarize, the first second type of page switch with more, the third is generally a change in the state of a page.

Summary of how iOS animations are used

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.