Jignesh B Jignesh B - 5 days ago 6
iOS Question

how to load url image in image view in iphone

- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"http://www.scri8e.com/effects/FL0WERZ/PNG/ir09.png"];
data = [[NSData alloc]initWithContentsOfURL:url ];
UIImage *img = [[UIImage alloc]initWithData:data ];
imageview.image=img;
}


above is my code but it does not load the image in image view

Answer

Try this library to https://github.com/nicklockwood/AsyncImageView.This will help you download images and display in the imageview.

Comments