I have 2 pages that I want to show as instructions the first time the app is run. How would I accomplish this?
Asked
Active
Viewed 404 times
-1
-
1Are you asking how to know if this is the first time the app had been run or how to show these two pages? If first, then take a look at http://stackoverflow.com/questions/9964371/how-to-detect-first-time-app-launch-iphone – Rok Jarc Jun 14 '12 at 19:04
-
1[Do you need inspiration](http://mobile-patterns.com/edu), or [code](http://mattgemmell.com/2008/12/08/what-have-you-tried/)? – CodaFi Jun 14 '12 at 19:07
-
@CodaFi it's better to ask an expert on the proper way to do this as it's been done countless times before – Kyle Jun 14 '12 at 19:32
-
@Kyle: Is that to imply that I lack credibility? No matter, the links I have provided are excellent reading. Though, I would suggest you reword this question before it is closed for literally being `not a question` – CodaFi Jun 14 '12 at 19:34
-
@CodaFi I'm implying you're trolling – Kyle Jun 26 '12 at 02:21
-
@Kyle: Trolling? The second link is standard reading for people who need us to "show them teh codez." To think that I would even have the slightest reason to falsify or "lead on" is a serious misjudgment of my character. Lest this become a flame war, I bid you good day, sir. – CodaFi Jun 26 '12 at 02:49
1 Answers
4
You can utilize NSUserDefaults
for something like this.
if(![[NSUserDefaults standardUserDefaults] boolForKey:@"didLoad"]) {
//Show your instructions
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"didLoad"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
What this does is, check if the didLoad
bool is FALSE (Which will be on first Load), if it is you show your instructions and set the BOOL
to YES
for the next Launch. You can put this in your viewDidLoad
method.

skram
- 5,314
- 1
- 22
- 26