Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make first launch iPhone App tour guide with Xcode

I'd like to know how to make a first launch tour guide for my iOS App with Xcode, I describe myself as a beginner in ObjectiveC language but what I know logically is that I've to make the App to detect the first launch of the Application and then display a scrollable tour guide with a skip button on the top to dismiss.

I've searched though the website but didn't find the best solution for my question.

It's basically two question:

  1. "How to detect the first launch of the app?" How to detect first time app launch on an iPhone

  2. "How to display the the tour guide which probably will be located in the storyboard?"

What I want is similar to the tour guide in (Paper) iPad app in Appstore.

like image 978
Ashoor Avatar asked Nov 11 '12 21:11

Ashoor


1 Answers

  1. On your first question, there is an accepted answer to the link you provided that answers your question. I'm not at all sure what your question is, as you seem to have found the answer on your own.

  2. On your second question, you should define a segue from your main view to the first scene of your tour guide and then trigger a segue programmatically on the basis of the results of the above answer. Bottom line, you have a segue between your main scene to the first scene of your tour guide, give that segue a unique identifier, and then on the basis of the NSUserDefaults stuff referenced in the previous point, invoking performSegueWithIdentifier if you determine that it's appropriate to kick off your tour.

    By the way, you're probably used to creating segues connected to a button or something like that. In this case, though, you'll create a segue between the view controllers by control-dragging (or right-click-dragging) from the view controller icon in the first scene to the first scene, like below. That way, it's not a scene that is triggered by a button or something like that, but something that, once you specify the identifier for the segue, your viewDidLoad of the first view controller can invoke the segue programmatically via performSegueWithIdentifier:

    create segue between view controllers

If you have any questions, let us know.

like image 97
Rob Avatar answered Sep 28 '22 00:09

Rob