views:

240

answers:

0

I was trying to put a GIF into my iphone app, but it just showed the first frame. I read that you have to put this coding into my app with a UIimageView.

UIImage *blur5 = [UIImage imageNamed:@"Picture 12.jpg"];
UIImage *blur6 = [UIImage imageNamed:@"Picture 13.jpg"];

self.imageView.animationImages = [[NSArray alloc] initWithObjects:blur5, blur6, nil];
self.imageView.animationRepeatCount = 2;
[self.imageView startAnimating];

But exactly where and how do I do it? Every time I try to run it, it gives me errors and Xcode freezes.