Created
October 11, 2012 14:11
-
-
Save boboboa32/3872579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *firstName = @"Bobo"; | |
NSString *lastName = @"Shone"; | |
int age = @"100"; | |
UIImage *avatar = image; | |
NSData *imageData = UIImageJPEGRepresentation(avatar, 100); | |
// Store the data | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
[defaults setObject:firstName forKey:@"firstName"]; | |
[defaults setObject:lastName forKey:@"lastname"]; | |
[defaults setInteger:age forKey:@"age"]; | |
[defaults setObject:imageData forKey:@"image"]; | |
[defaults synchronize]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment