Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Does the iPhone play animated GIFs?

Hi,

Does the iPhone play animated GIFs? Sorry for asking such a basic question but I can't seem to find the answer on the web or within this forum.

Also how do you implement it into your code? Do you need to use a UIWebView or can you just declare it like a regular png or jpg (e.g. UIImage *image = [[UIImage imageNamed:@"photo.gif"])

Thanks for any help.

Mac OS X (10.5.4)

Posted on Aug 18, 2008 3:57 AM

Reply
4 replies

Oct 8, 2008 2:44 AM in response to Ascon

you can play gif in webView ,just the same way you load a jpeg or png..

NSString *path = [[NSBundle mainBundle] pathForResource:@"santa" ofType:@"gif"];

NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
/* Load the request. */
[myWebView loadRequest:[NSURLRequest requestWithURL:url]];

the gif that is locally saved will be loaded.

Does the iPhone play animated GIFs?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.