【代码笔记】iOS-gif图片播放
2017-04-18 08:46
531 查看
一,效果图。
二,工程图。
三,代码。
RootViewController.h
RootViewController.m
二,工程图。
三,代码。
RootViewController.h
#import <UIKit/UIKit.h> @interface RootViewController : UIViewController @end
RootViewController.m
#import "RootViewController.h" //加入头文件 #import "GifView.h" @interface RootViewController () @end @implementation RootViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. GifView *gifview = [[GifView alloc] initWithFrame:CGRectMake(0, 0, 200, 200) filePath:[[NSBundle mainBundle] pathForResource:@"test.gif" ofType:nil]]; [self.view addSubview:gifview]; }
相关文章推荐
- 【代码笔记】iOS-gif图片播放
- 《iOS开发之美》节选: 如何在iOS中播放gif 动画图片?
- Fresco 使用笔记(一):加载gif图片并播放
- 【代码笔记】iOS-通过颜色来生成一个纯色图片
- 【代码笔记】iOS-实现网络图片的异步加载和缓存
- 【代码笔记】iOS-图片旋转
- 如何在iOS中播放gif 动画图片?
- 【代码笔记】iOS-使图片两边不拉伸,中间拉伸
- 【代码笔记】iOS-通过颜色来生成一个纯色图片
- iPhone上用OpenGL实现gif图片动画播放的代码
- 播放 GIF 图片的代码
- IOS 播放动态Gif图片
- 【代码笔记】iOS-利用图片序列创建动态图片效果
- 【代码笔记】iOS-图片手势,上传照片
- iOS开发笔记--图片上传代码
- iOS 中播放gif图片
- iOS开发之旋转动画及GIF格式图片的播放
- 【代码笔记】iOS-清除图片缓存UIActionSheet
- 【代码笔记】iOS-图片旋转
- 【代码笔记】iOS-图片手势,上传照片