iOS development adds animation to UIView animation

Source: Internet
Author: User

Self.testview need to add animated view

1. Flip Animation

[UIView beginanimations:@ "doflip"  Context:nil];    [UIView setanimationduration: 1 ];    [UIView setanimationcurve:uiviewanimationcurveeaseinout];    [UIView setanimationdelegate:self];    [UIView setanimationtransition:uiviewanimationtransitionflipfromleft ForView:self.testView Cache:yes];    [UIView commitanimations];

2. Rotate the animation

    cgaffinetransform transform;     6.0 );    [UIView beginanimations: @" Rotate " Context:nil];    [UIView setanimationduration: 2 ];    [UIView setanimationdelegate:self];    [Self.testview Settransform:transform];    [UIView commitanimations];

3. Offset animations

    [UIView beginanimations:@ "move"  Context:nil];    [UIView setanimationduration: 2 ];    [UIView setanimationdelegate:self];    Self.testView.frame=cgrectmake (N,+);    [UIView commitanimations];

4. Page Turn effect

[UIView beginanimations:@"Curlup"Context:nil]; [UIView setanimationduration:1]; //Set Animation fades[UIView setanimationcurve:uiviewanimationcurveeaseinout];    [UIView setanimationdelegate:self]; Self.testView.frame=cgrectmake ( -, -, -, -); //set the direction of page flipping[UIView setanimationtransition:uiviewanimationtransitioncurlup ForView:self.testView Cache:yes]; [UIView commitanimations];

5. Zoom Effect

    cgaffinetransform  transform;     = Cgaffinetransformscale (Self.testView.transform,1.2,1.2);    [UIView beginanimations: @"  Scale " Context:nil];    [UIView setanimationduration: 2 ];    [UIView setanimationdelegate:self];    [Self.testview Settransform:transform];    [UIView commitanimations];

6. Take the inverse effect

    cgaffinetransform transform;    Transform=Cgaffinetransforminvert (self.testView.transform);    [UIView beginanimations: @" Invert " Context:nil];    [UIView setanimationduration: 2]; // animations are often     [UIView setanimationdelegate:self];    [Self.testview Settransform:transform]; // get the transform    of the changed view [UIView commitanimations]; // Turn off animations

iOS development adds animation to UIView 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.