// 设定位置和大小
CGRect frame = CGRectMake(50,50,0,0);
frame.size = [UIImage imageNamed:@"anim.gif"].size;
// 读取gif图片数据
NSData *gif = [NSData dataWithContentsOfFile:
[[NSBundle mainBundle] pathForResource:@"anim" ofType:@"gif"]];
// view生成
UIWebView *view = [[UIWebView alloc] initWithFrame:frame];
[view loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];
CGRect frame = CGRectMake(50,50,0,0);
frame.size = [UIImage imageNamed:@"anim.gif"].size;
// 读取gif图片数据
NSData *gif = [NSData dataWithContentsOfFile:
[[NSBundle mainBundle] pathForResource:@"anim" ofType:@"gif"]];
// view生成
UIWebView *view = [[UIWebView alloc] initWithFrame:frame];
[view loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];