Brand new to this site, pretty amateur knowledge here! Started teaching myself a few weeks ago. Got a pretty solid iPhone app however the last feature I would like to implement is the ability to;
Create a 'first launch only' guided tour.
What i want to know is; if it is the users first launch of the application how can i redirect the view to a new view controller that isn't the 'initial view controller' without the tap of a button, all programatically.
Ive read a few tutorials about detecting first launch which i understand. Ive also read a few tutorials and tried everything in the book to try and implement "performSegueWithIdentifier" however nothing is working for me!
Perhaps its because I'm using Xcode 5 and testing on iOS 7. If anyone can help me, I would be forever grateful!
(void)viewDidLoad
{
[super viewDidLoad];
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"FirstLaunch"]) {
}
else {
// Place code here
self.view.backgroundColor = [UIColor redColor];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"FirstLaunch"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
// Do any additional setup after loading the view, typically from a nib.
}
[[NSUserDefaults standardDefaults] registerDefaults:]
anywhere in your code? – Bohon