Skip to content

Instantly share code, notes, and snippets.

@boboboa32
Created October 11, 2012 14:12
Show Gist options
  • Save boboboa32/3872580 to your computer and use it in GitHub Desktop.
Save boboboa32/3872580 to your computer and use it in GitHub Desktop.
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *firstName = [defaults objectForKey:@"firstName"];
NSString *lastName = [defaults objectForKey:@"lastname"];
int age = [defaults integerForKey:@"age"];
NSData *imageData = [defaults dataForKey:@"image"];
UIImage *avatar = [UIImage imageWithData:imageData];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment