6

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.

Community
  • 1
  • 1
Ashoor
  • 1,358
  • 1
  • 9
  • 11

1 Answers1

11
  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.

Community
  • 1
  • 1
Rob
  • 415,655
  • 72
  • 787
  • 1,044
  • 3
    P.S. If you forgive the editorial, I'm personally of the opinion that any app that requires a tour to show the user how to use it is too complicated. Sure, sometimes for a very rich app you might need to do it, but 9 times out of 10, if an app requires a tour to show a user how to use the app, the app is just poorly designed and too complicated. Apps should be intuitive, and we should view the need to include instructions as a design failure. We should all strive to develop apps for which online help/tours are entirely unnecessary! – Rob Nov 11 '12 at 21:37
  • Many thanks, yea this would solve my problem, I'm creating a very complicated app as you said but I didn't miss the UI part, so I'm taking care of both. The only problem is that it's a very big project and I'm new to Objective-C. I found it easy and smart but when it comes to database and other stuff I guess I'll get stuck. – Ashoor Nov 20 '12 at 07:45
  • @Mr.Roy - yeah, this answer is over three years old. I've updated answer with current link (though Apple's documentation on this point isn't as complete as I believe it used to be ... The _View Controller Programming Guide_ has less emphasis on programmatic interfaces nowadays). But there are many answers here is Stack Overflow that illustrate how to programmatically perform segue (e.g. http://stackoverflow.com/a/27650207/1271826). – Rob Feb 16 '16 at 16:53