摘要:
本次实现gif动画播放是通过将动画文件读取到CGImageSourceRef,然后用NSTimer来播放的。代码如下:首先是头文件#import <UIKit/UIKit.h>#import <ImageIO/ImageIO.h>#import <MobileCoreServices/MobileCoreServices.h>@interface GifView : UIView { CGImageSourceRef gif; // 保存gif动画 NSDictionary *gifProperties; // 保存gif动画属性 size_t index; 阅读全文
posted @ 2012-03-04 22:13 蜗牛狂奔 阅读(9353) 评论(1) 推荐(0) 编辑