How do I get a UIImage
from a small image file on my server (can be .jpg
or .png
)?
views:
158answers:
1
+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
2009-09-07 11:20:37
THanks teabot!
RexOnRoids
2009-09-07 11:29:57