Created
June 13, 2011 08:07
-
-
Save bartolsthoorn/1022449 to your computer and use it in GitHub Desktop.
EXC_BAD_ACCESS
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(onTimer) userInfo:nil repeats:YES]; | |
if (![[NSUserDefaults standardUserDefaults] objectForKey:kCurrentPage]) { | |
[[NSUserDefaults standardUserDefaults] setInteger:1 forKey:kCurrentPage]; | |
currentPage = 1; | |
} else { | |
currentPage = [[NSUserDefaults standardUserDefaults] integerForKey:kCurrentPage]; | |
} | |
} | |
- (void)onTimer { | |
NSLog(@"Current page is %@", currentPage); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment