i have implemented image picker controller delegate:
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSString *mediaType = [info valueForKey:UIImagePickerControllerMediaType];
if ([mediaType isEqualToString:@"public.image"]) {
UIImage *anImage = [info objectForKey:UIImagePickerControllerOriginalImage];
//i know i can get image name from info key.
if(self.block) self.block(YES, anImage, nil);
}
[picker dismissViewControllerAnimated:YES completion:nil];
}
i am using UIImageView+PlayGIF category to show gif images (loader in my app) from main resource bundle successfully.Some thing like:
NSData *gifData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"loading_image.gif" ofType:nil]];
CGRect bnd = view.bounds;
loader.gifView = [[YFGIFImageView alloc] initWithFrame:CGRectMake(bnd.size.width/2-60, bnd.size.height/2-70, 120, 120)];
loader.gifView.backgroundColor = [UIColor clearColor];
loader.gifView.gifData = gifData;
Questions: So how can i export photo library gif to document directory as (whatevername.gif), and use above category to show gif.
Or can i get direct nsdata from photolibrary and use above category to show gif.(i prefer this).
I have not tried with UIWebView, can i show gif on UIWebView.
Thanks
set property of imageView.
Download the Class of GIF imageLoad with
UIImageViewGIFImageLoad
Now load Data from
NSBundle.Load image with
animatedImageWithAnimatedGIFDataas below.OR
Load image with URL
animatedImageWithAnimatedGIFURLas below.OR
Load image with GIFURL
animatedImageWithAnimatedGIFURLas below.