How to download image from url in iphone and iPad Development

Here is the code for getting image from url.

NSData *imageData = [NSData dataWithContentsOfURL:yourURL];
UIImage *image = [UIImage imageWithData:imageData];

replace url Link with your url address

Note: this is synchronous method,,
this method will freeze app if your image size is too big , in that case use asynchronous method

Leave a Reply

Your email address will not be published. Required fields are marked *