Coder Social home page Coder Social logo

sl33k / dntutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielniemeyer/dntutorial

0.0 1.0 0.0 4.17 MB

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

License: MIT License

Ruby 1.47% Objective-C 89.51% C 0.71% Shell 8.31%

dntutorial's Introduction

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.

dntutorial's People

Contributors

fylock avatar jeffreyjackson avatar kgn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.