Return to Snippet

Revision: 20392
at November 14, 2009 13:11 by ollie

Initial Code
NSString *name = [NSString stringWithFormat:@"", uid];
NSURL *url = [NSURL URLWithString:name];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [UIImage imageWithData:data];
((UIImageView *) [self.view viewWithTag:1]).image = img;

Initial URL

Initial Description
How to dwonload and use a Retro Avatar image in a iPhone App.
In this example: uid is a Facebook user id, optionally you can use any string, a name, a md5 hash of a email address and it is assumed you have an image view with tag id 1 you want to set the image for

Initial Title
Using the Retro Avatar API in iPhone

Initial Tags

Initial Language