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