Created
November 5, 2012 04:13
-
-
Save ChrisRisner/4015281 to your computer and use it in GitHub Desktop.
iOS Day 11
This file contains hidden or 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
- (IBAction)tappedLoadData:(id)sender { | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
self.lblInfo.text = [defaults objectForKey:@"infoString"]; | |
} |
This file contains hidden or 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
- (IBAction)tappedSaveData:(id)sender { | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
[defaults setValue:@"My saved Data" forKey:@"infoString"]; | |
} |
This file contains hidden or 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
- (IBAction)tappedSaveData:(id)sender { | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
[defaults setValue:@"My saved Data" forKey:@"infoString"]; | |
[defaults synchronize]; | |
} |
This file contains hidden or 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
#import <UIKit/UIKit.h> | |
@interface ViewController : UIViewController | |
- (IBAction)tappedSaveData:(id)sender; | |
- (IBAction)tappedLoadData:(id)sender; | |
@property (weak, nonatomic) IBOutlet UILabel *lblInfo; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment