WatchKit: how to animate images stored in Nsmutablearray dynamically in objC

Here is my doubt !!!

How to launch a gif image directly from nsmutablearray, which I stored images dynamically, assigning it Wkinterfaceimage ???

I am currently working on GIf images that assign wkinterfaceimage. I saved a set of images in a Mutablearray at runtime by converting a gif image. How to assign this array to wkinterfaceimage to show run gif image. I found a couple of tutorials in Swift that I tried to implement in OBJ C, Plz, let me know the ideas and cheers in Target

Here is my code

 [imageView setImage:[frames objectAtIndex:0]];

 [imageView startAnimatingWithImagesInRange:NSMakeRange(0,frames.count) duration:1 repeatCount:0];

using the above code showing a blank screen on similator if commented on the second line showing 0 index image.

 2015-04-08 10:21:53.206 WatchkitDemo WatchKit Extension[852:24553] {
     DelayTime = "0.1";
     UnclampedDelayTime = 0; }

Frames

2015-04-08 10:21:58.807 WatchkitDemo WatchKit Extension[852:24553] (
    "<UIImage: 0x7fe358d2d320>",
    "<UIImage: 0x7fe358f05d60>",
    "<UIImage: 0x7fe358f08230>",
    "<UIImage: 0x7fe358d2fd50>"
)
+4
1

gif-, , . , Mayoff UIImage Category . , :

1) gif , :

+[UIImage animatedImageWithAnimatedGIFData:(NSData *)data]
+[UIImage animatedImageWithAnimatedGIFURL:(NSURL *)url]

2) UIImage + animatedGIF.m. # 89 animatedImageWithAnimatedGIFImageSource. createImagesAndDelays. , CGImageRef images[count].

gif.

3) , Wkinterfaceimage.

, :)

+3

All Articles