简单介绍一个第三方UIImageView-PlayGIF.如何添加到项目不再介绍.......
方法一 : 通过继承的方式
YFGIFImageView *otherGIFView=[[YFGIFImageView alloc]init];
otherGIFView.gifPath=[[NSBundle mainBundle] pathForResource:@"big.gif" ofType:nil];
[otherGIFView startGIF];
[self.view addSubview:otherGIFView];
方法二 : 类别的方式
UIImageView *gifImgView=[[UIImageView alloc]init];
gifImgView.backgroundColor=[UIColor yellowColor];
gifImgView.gifPath = [[NSBundle mainBundle] pathForResource:@"big.gif" ofType:nil];
[gifImgView startGIF];
[self.view addSubview:gifImgView];