版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/qq_31810357/article/details/50498380
-
- CGRect frame = CGRectMake(50,340,[UIScreen mainScreen].bounds.size.width / 2,[UIScreen mainScreen].bounds.size.height / 2);
- frame.size = [UIImage imageNamed:@"640gif.gif"].size;
-
-
-
- NSData *gif = [NSData dataWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"640gif" 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];