I am using cell.image= a animated gif file (cell is UITableViewCell). However, it does not animate. Is there any way I can fix it?
A:
Your only choices are to code own mechanism of rendering the gif in a view or wait for apple to fix it.
GameFreak
2009-06-10 00:37:45
+2
A:
In iPhone OS 3.0, cell.image is no longer supported. Instead, cell's have an imageView property, which gives you some more flexibility. You can split the animated gif up into separate images, and then do this:
anImageView *UIImageView = [[UIImageView alloc] init];
anImageView.animationImages = imagesArray; //this is an array of UIImages you have to create
Dan Lorenc
2009-06-10 01:16:38
+10
A:
UIImageView
provides the necessary APIs to produce your own animations like so:
UIImage *frame1 = [UIImage imageNamed:@"frame1.png"];
UIImage *frame2 = [UIImage imageNamed:@"frame2.png"];
UIImage *frame3 = [UIImage imageNamed:@"frame2.png"];
UIImage *frame4 = [UIImage imageNamed:@"frame2.png"];
uiImageView.animationImages = [[NSArray alloc] initWithObjects:frame1, frame2, frame3, frame4, nil];
uiImageView.animationDuration = 1.0 // defaults is number of animation images * 1/30th of a second
uiImageView.animationRepeatCount = 5; // default is 0, which repeats indefinitely
[uiImageView startAnimating];
// [uiImageView stopAnimating];
Nathan de Vries
2009-06-10 01:36:56