Git Product home page Git Product logo

kdintroview's Introduction

KDIntroView

Installation

To install it, simply add the following line to your Podfile:

pod 'KDIntroView'

or drag these files into the project

KDIntroView.swift
KDIntroViewController.swift

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

Requirements

iOS 8.0

Introduction

KDIntroView is a framework to create dynamic onboarding views(onboarding flows) for your iOS App. You can create all sorts of cool animations.

Start!!!

  • Step One

Create all the views you need as xibs. Link each xib file with a class that inherits KDIntroView. Override moveEverythingAccordingToIndex(index: CGFloat).

Design your interface as you wish. This framework works for both code generated UI and autolayout.

Make sure each view has a clear background color if you wish to perform color change.

  • Step Two

Create a ViewController that inherits KDIntroViewController. (don't forget to import KDIntroView)

In viewDidAppear, call setup, and pass in an array that contains the name of all the xibs you created. Arrange them in the order you with them to appear. Override moveEverythingAccordingToIndex(index: CGFloat).

Now, you can see your views, but they are static.

  • Step Three

Implement the moveEverythingAccordingToIndex(index: CGFloat) in each view. The index: CGFloat variable is the offset of the scroller. In the first and the last view, index: CGFloat range from 0 ~ frame.width. In all the other views, index: CGFloat range from 0 ~ 2 * frame.width.

We have build-in functions, but you can easily customize your animation with CGAffineTransformation. There are more example in the demo project.

Also implement the moveEverythingAccordingToIndex(index: CGFloat) in viewcontroller to perform color animation and touchable elements. All the touchable elements must be added in the view controller and call view.bringSubviewToFront() after setup to make them reachable.

You can literally create any kind of animation! Play around with it, and free your imagination!

Author

Kedan Li, TakefiveInteractive.com

License

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

kdintroview's People

Contributors

likedan avatar oliverziegler avatar tedko avatar

Watchers

James Cloos avatar Asif Ikbal 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.