开发笔记 那些年追过的图片(五):imageView GIF 动画

-(void)startGIGAnimation

{

    

    

    NSMutableArray* arrayValue = [[NSMutableArrayalloc]init];

    for (int i = 1; i<= 5; i++)

    {

        NSString *value = [NSStringstringWithFormat:@"%d",i];

        NSString *imageName = [NSStringstringWithFormat:@"image%@.png",value];

        UIImage *image = [UIImageimageNamed:imageName];

        [arrayValue addObject:image];

        

    }

    

    [_imageView setAnimationImages:arrayValue];

    [_imageView setAnimationDuration:3];

    [_imageView startAnimating];

    

    


}


-(void)stopGIGAnimation

{

    

    [_imageView stopAnimating];

    

}

你可能感兴趣的:(开发笔记,那些年追过的图片五imageV)