There are any guides on implementing an in-app tutorial for iPhone? [closed]
Do you know some resource (url, pdf, etc.) that can help me to do an in-app tutorial?
Let me explain better: the first time that the user uses my iPhone app, I want to put bubble messages pointing/describing each part of the interface.
The problem is that I don't know where to start. :D
Any help will be appreciated. Thanks in advance.
Here’s a low-tech answer:
- Take a screen shot of your app
- Import it into Photoshop (or the equivalent, like Acorn)
- Draw all the boxes and arrows you want
- Export as a PNG (with transparent background)
- Add as a UIImageView
- Code it to show up the first launch, and disappear on a tap
Not knowing any more about your app or the spec for the tutorial, this is by far the easiest solution.
I've never done this before, but I would try to put a UIView
(I'll call it UIBubbleView
) on top of all my views.
- RootView
- UIBubbleView
- UIRootNavigationView
- Any other UIViews
The UIBubbleView
will display all the bubbles. Whenever you want to put a bubble on top of your actual view, you just call the UIBubbleViewController
(I would implement this controller as a Singleton for convenience with a reference in your main AppDelegate) to display the Bubble for tutorial part.
As you want to display the bubble only once you set a property to not show this specific bubble anymore. If all bubbles are shown (or the user disabled the tutorial function) you never return the instance of your UIBubbleViewController
and release the actual UIViewController
with its UIView (or never create it on startup).
Benefits of this approach:
- You get only one function call for each tutorial bubble
- You can call the tutorial bubbles from anywhere in you app
- You can store all tutorial data (where is the bubble, it's text, has been shown?) in one place/file
Though it might be tricky to get the initial setup run.
One quick way of doing this would be to create a single view that contains a UILabel
(and any other controls you might like), that has an NSString
property that allows you to set which text is displayed in the body (I'm sure you get the idea).
You could then present the view with a UIPopoverController
Making use of Presenting From a Specific Rect for general UI Components and Presenting From a Bar Button Item where applicable.
The nice thing about UIPopoverController
is that it will automatically point to the rect you provide, so will be a kind of 'hovering bubble'. It will also dismiss when the user taps outside of it; however, you can't have more than one on screen at once.
Start with the UIView Class Reference and View Programming Guide for iOS:
Basically, what I would do is create a UIView class that lets you draw where the arrow points to and enter what you want the bubble to say. And when you tap the view, it hides and moves on to the next tip.
Then use the addSubview:
method which lets you add a subview on top of its siblings...
For checking whether user is opening app for first time, you can use NSUserDefault
set to BOOL
value every time in didFinishLaunchingWithOption
. On the basis of this just Pop up the Bubble Message and show your description as you wish.
Also you can put entry in plist file and check plist entry whenever app starts.
For UIPopover
and showing description part others have already given suggestions...
精彩评论