To install it, simply add the following line to your Podfile:
or drag these files into the project
To run the example project, clone the repo, and run
pod install from the Example directory first.
KDIntroView is a framework to create dynamic onboarding views(onboarding flows) for your iOS App. You can create all sorts of cool animations.
- Step One
Create all the views you need as xibs. Link each xib file with a class that inherits
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)
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
Now, you can see your views, but they are static.
- Step Three
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
setup to make them reachable.
You can literally create any kind of animation! Play around with it, and free your imagination!
Kedan Li, TakefiveInteractive.com
KDIntroView is available under the MIT license. See the LICENSE file for more info.