Load image from image url to show animation in UIImageview - ios

I m getting more than 200 image url from web service and i am converting image url to UIImage array and showing animation in UIImageView and its crashing in device and its working fine in simulator? Can you plz provide any solution for this issue.

I think you should handle this job by using the native API:
[UIImage +animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration]

Related

iPad image is getting cropped/resized while using image picker controller in objective c

When I use image picker to take photos using iPad camera , the photos are automatically getting resized/cropped while storing it.The same code is working fine with iPhone.Can anyone please help me to find out a solution for this. I am getting this in iOS 9.x.I need original images to be displayed.
Thank you very much in advance.
My issue got resolved when I changed
UIImage * image = info[UIImagePickerControllerEditedImage];
to
UIImage * image = info[UIImagePickerControllerOriginalImage];
in didFinishPickingMediaWithInfo method.

How to get gif asset UIImage

How to load animated GIF image as UIImage from *.imageset folder with different resolutions, without any additional pods?
If i put my GIF images in *.imageset folder they correctly display in XCode http://take.ms/7fsCp, but when i try to load it with UIImage, it returns nil
UIImage *image = [UIImage imageNamed: #"help_image"];
How to make it works?
You can use SDWebImage to do that.
#import "UIImage+GIF.h"
self.imageViewGif.image= [UIImage sd_animatedGIFNamed:#"help_image"];
I hope this can help you.
Add animated Gif image in Iphone UIImageView
check this link you will get your answer Using UIImage category you can get the exect output.

UIImage orientation issue in Share Extension

I am trying a Share Extension that iOS provides. Having trouble while getting UIImage from gallery host.
The image is is not in appropriate orientation. Any suggestion how can i get proper image from Photos as host to Share extension.
I am using loadItemForTypeIdentifier of NSItemProvider to get image object.
Kindly help, thanks in advance.

Display Image from URL iOS

I am using SDWebImage to display an image from URL inside an UIIMageView.
The issue is that my picture is not displayed while it works fine with other pictures from other servers.
This is my implementation:
[imageView sd_setImageWithURL:[NSURL URLWithString:product.imagePath]
placeholderImage:[UIImage imageNamed:#"apple-iphone-6-128gb-gold.jpg"]];
It doesnt work with this image from this URL: http://www.swstelecom.fr/api/images/products/1111/614
but it works with this one:
http://4.bp.blogspot.com/_hN-RNLUCt5Q/TSra3nOGmuI/AAAAAAAACZM/57j1rMTbPPs/Beautiful+love+wallpaper+3.jpg
Can anyone tell me why it doesnt work with the first image URL and how can I make it work, without making changes on the server, Because I dont have any control on server implementation.
PS: the picture is displayed fine on browser, so I dont understand what is the real problem here.
First link requires a login and password.
The link should have ".jpg" or ".png" at the end of it.

How to run a animated Gif directly by assigning it to Wkinterfaceimage using watchkit in Xcode?

Here is my doubt !!!
How to run a animated gif image directly by getting dynamically from url / NSdata and assigning it to Wkinterfaceimage ???
i am working on the applewatch app development from past few days it's so great.Currently i'm working on the GIf Images assigning to the imageview. I successfuly done by adding the series of images statically in xcode and running it by assigning to Wkinterfaceimage.
Right now, Watchkit does not support to run the GIF image. So although you can download the GIF Image from url but you can't show up on the watchkit interface. to show the gif file, we have split gif file to severals images and after that we can start animated the image instead of show gif file.
Download GIF image from URL to NSData type. Then, Pass that NSData object to WKInterfaceImage setImageData method.

Resources