iOS-加载动态图

来源:互联网 发布:软件角色管理 编辑:程序博客网 时间:2024/06/09 14:40

在网上找了一下加载动态图的方法,结果只在http://www.cocoachina.com/bbs/read.php?tid-18439.html这里找到了方法:用网页的形式显示gif动态图

UIWebView *webView = [[UIWebViewalloc] initWithFrame:CGRectMake(0,40, 310, 480)];

    NSString *html = [NSStringstringWithFormat:@"<img src='file://%@/1.gif'>",[[NSBundlemainBundle] bundlePath]];

   [webView loadHTMLString:htmlbaseURL:nil];

   [self.viewaddSubview:webView];

0 0