Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

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.