原理 利用webview
CGRect frame = [UIScreen mainScreen].bounds;
//frame.size = [UIImage imageNamed:@"yourname.gif"].size;
NSData * gif = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"yourname" ofType:@"gif"]];
UIWebView * webview = [[UIWebView alloc] initWithFrame: frame];
webview.userInteractionEnabled = NO;
[webview loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];
[self.view addSubview:webview];
1934

被折叠的 条评论
为什么被折叠?



