views:

158

answers:

1

How do I get a UIImage from a small image file on my server (can be .jpg or .png)?

+4  A: 

Try this:

NSString* url = @"http://my.server.com/image.png";
NSData* data = [NSData dataWithContentsOfURL:url];
UIImage* image = [UIImage imageWithData:data];

See also:

[NSData dataWithContentsOfURL:options:error:]
teabot
THanks teabot!
RexOnRoids