Comments:
Duration Animation finish time,
Delay animation extended time, can be understood as animation speed of time control
One, using
Cgaffinetransformmakescale to do the zoom effect of the graph
View.transform = Cgaffinetransformmakescale (1,1); [UIView animatekeyframeswithduration:duration/3Delay:delay options:0animations:^{ //EndView.transform = Cgaffinetransformmakescale (1.2,1.2); } Completion:^(BOOL finished) {[UIView animatekeyframeswithduration:duration/3Delay0Options0animations:^{ //EndView.transform = Cgaffinetransformmakescale (0.9,0.9); } Completion:^(BOOL finished) {[UIView animatekeyframeswithduration:duration/3Delay0Options0animations:^{ //EndView.transform = Cgaffinetransformmakescale (1,1); } Completion:^(BOOL finished) {}]; }]; }];
Two, combine alpha to do flash zoom
1 ; = Cgaffinetransformmakescale (0.90.9); [UIView animatekeyframeswithduration:duration/3 delay:delay options:0 animations:^{ // End 0 ; = Cgaffinetransformmakescale (1.21.2); } completion:^(BOOL finished) { }];
Third, using
Cgaffinetransformmaketranslation to do the mobile animation of the view
View.transform = Cgaffinetransformmaketranslation (Cgrectgetwidth ([UIScreen mainscreen].bounds),0); [UIView animatekeyframeswithduration:duration/4Delay:delay options:0animations:^{ //EndView.transform = Cgaffinetransformmaketranslation (-Ten,0); } Completion:^(BOOL finished) {[UIView animatekeyframeswithduration:duration/4Delay0Options0animations:^{ //EndView.transform = Cgaffinetransformmaketranslation (5,0); } Completion:^(BOOL finished) {[UIView animatekeyframeswithduration:duration/4Delay0Options0animations:^{ //EndView.transform = Cgaffinetransformmaketranslation (-2,0); } Completion:^(BOOL finished) {[UIView animatekeyframeswithduration:duration/4Delay0Options0animations:^{ //EndView.transform = Cgaffinetransformmaketranslation (0,0); } Completion:^(BOOL finished) {}]; }]; }]; }];
Of course, these are all can be combined to do a more cool animation, only need to understand the principle of response, you can do the definition of animation as needed
customizing simple animations