Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement App Instructions on First Start Up

Tags:

iphone

I have a couple of images that I would like to display the first time a user runs the app to show the user how to effectively use the app. What is the best method to do this sort of thing?

Thanks

like image 314
Kevin_TA Avatar asked Apr 05 '26 21:04

Kevin_TA


2 Answers

The easiest way is to set a flag that says you have shown the app instructions. You can store them in user defaults.

So you would put something like this in your app delegate.

static NSString* const kAppHasShownStartupScreen = @"kAppHasShownStartupScreen";

BOOL hasShownStartup = [[NSUserDefaults standardUserDefaults] boolForKey:kAppHasShownStartupScreen];

if(hasShownStartup)
{
    window.rootViewController = //your normal startup view controller
}
else
{
    window.rootViewController = //your new view controller with instructions
    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kAppHasShownStartupScreen];
}
like image 159
DHamrick Avatar answered Apr 08 '26 12:04

DHamrick


Create some boolean values to store in NSUserDefaults or in Core Data that represent whether or not the user has viewed the 'tutorial'. Show the images by loading them into UIImageView's and adding them as subviews if the flag is false. Set the flag to true after they have viewed the images.

like image 27
shawnwall Avatar answered Apr 08 '26 10:04

shawnwall