利用UIWebView显示gif

NSString *path = [[NSBundle mainBundle] pathForResource:@"3" ofType:@"gif"];
NSData *gifData = [NSData dataWithContentsOfFile:path];
[_webView loadData:gifData MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];

编程技巧