dnt

DNTutorial

DNTutorial provides an easy to use introductory tutorial system based on Paper by Facebook.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

42

Maintenance

Last Commit

5yrs ago

Contributors

3

Package

Dependencies

0

License

MIT

Categories

Readme

DNTutorial

CI Status Version License Platform

DNTutorial manages a set of tutorial elements that guide users on how to interact with your app.

The implementation of DNTutorial is very simple and was mainly based on Paper by Facebook.

alt tag

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

To use DNTutorial, import the DNTutorial header file to your view controller and add it as a delegate of DNTutorial. To present a tutorial, simply create the tutorial elements you would like to present.

An example of creating a tutorial sequence.

    DNTutorialBanner *banner = [DNTutorialBanner bannerWithMessage:@"A banner message" completionMessage:@"Completion message" key:@"banner"];
    
    DNTutorialGesture *scrollGesture = [DNTutorialGesture gestureWithPosition:center type:DNTutorialGestureTypeScrollLeft key:@"gesture"];

    DNTutorialStep *step = [DNTutorialStep stepWithTutorialElements:@[banner, scrollGesture] forKey:@"step"];
    
    [DNTutorial presentTutorialWithSteps:@[step1] inView:self.view delegate:self];

To style the appearance of a banner simply call the style method

    [banner styleWithColor:[UIColor blackColor] completedColor:[UIColor blueColor] opacity:0.7 font:[UIFont systemFontOfSize:13]];

Customization

DNTutorial comes with two standard tutorial elements (DNTutorialBanner, DNTutorialGesture).

Both standard classes derive from the same base class, DNTutorialElement. This polymorphic class provides an easy framework for you to come up with your own tutorial element subclasses that can work with the tutorial system right from outside the box.

And if you come up with a cool class, just submit a pull request so that I can add it to the repo.

Installation

DNTutorial is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DNTutorial"

There are two options:

  1. Adding it to your pod file.
  2. Manually add the files into your Xcode project. Slightly simpler, but updates are also manual.

DNTutorial requires iOS 7 or later.

TODO

  • Add ability to hide and show a tutorial step and see how it syncs with skipping a tutorial step.

  • Dismiss objects based on user actions √

  • Look into NSObject as the base type for tutorialElements √

  • Flexible implementation with polimorphic base classes for easy customizable subclasses √

  • Save state on user defaults √

Author

Daniel Niemeyer

License

DNTutorial is available under the MIT license. See the LICENSE file for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100