-(void) play
{
First picture animation mode Kinsoku
Tail Way
[UIView beginanimations:nil context:nil];//Animation starts
[UIView setanimationduration:10];//setting animation playback duration
/* Internal write image processing */
[UIView commitanimations];//Commit Animation
Second way: Picture animation end Processing mode
[UIView animatewithduration:10 animations:^{
/* Picture processing operation */
} completion:^ (BOOL finished) {
if (finished)
{
/* Action to end playback of the animation, you can set the control's light-in fade effect */
}
}];
The third way; sequence frame mode
Uiimageview *image=[[uiimageview Alloc]init];
image.animationduration=3;//Setting Animation duration
[Image Setanimationimages:[nsarray new]];//set up a picture resource to play, like to put a movie
image.animationrepeatcount=1;//setting the number of plays
[Image startanimating];//Start animation
[Image isanimating];//to determine if the animation is complete
[Image stopanimating];//End animation
}
Three modes and basic code implementations for picture animations in iOS