Skip to content

StreetHawkInc/paper-onboarding

 
 

Repository files navigation

header

paper-onboarding

Twitter

About Pointzi

This project is maintained by Pointzi from the original creation by Ramotion Inc.
This fork of the popular Paper Onboarding carousel (or slider) allows you to update the images, design and content WITHOUT re-releasing the App.

The code has been modified to remove hard-coded JSON and instead create an account at https://dashboard.pointzi.com and change the content/design there.

Requirements

  • iOS 10.0+
  • Xcode 8

Installation

Open pod file, add pod dependency.

or use CocoaPods with Podfile:

platform :ios, '8.0'

use_frameworks! # This line is compulsory, as "paper-onboarding-pointzi" since it is a swift pod

target 'PointziDemo' do # Replace with your target if you have one

pod "pointzi"
pod "paper-onboarding-pointzi"  # Add this pod if you wish to use carousel

end

Run pod update.

Now you can design your beautiful carousels.

Without CocoaPod

Download pointzi paper onboarding source code from https://gitlab.com/pointzi/sdks/paper-onboarding-ios.git

Drag & drop source folder into your app project.

Now you are ready to design your beautiful carousels.

Usage

Storyboard

  1. Create a new UIView inheriting from PaperOnboarding

  2. Set dataSource in attribute inspector

or Code

override func viewDidLoad() {
  super.viewDidLoad()

  let onboarding = PaperOnboarding(itemsCount: 3)
  onboarding.dataSource = self
  onboarding.translatesAutoresizingMaskIntoConstraints = false
  view.addSubview(onboarding)

  // add constraints
  for attribute: NSLayoutAttribute in [.Left, .Right, .Top, .Bottom] {
    let constraint = NSLayoutConstraint(item: onboarding,
                                        attribute: attribute,
                                        relatedBy: .Equal,
                                        toItem: view,
                                        attribute: attribute,
                                        multiplier: 1,
                                        constant: 0)
    view.addConstraint(constraint)
  }
}

For adding content use dataSource methods:

func onboardingItemAtIndex(index: Int) -> OnboardingItemInfo {
   return [
     ("BIG_IMAGE1", "Title", "Description text", "IconName1", "BackgroundColor", textColor, DescriptionColor, textFont, DescriptionFont),
     ("BIG_IMAGE1", "Title", "Description text", "IconName1", "BackgroundColor", textColor, DescriptionColor, textFont, DescriptionFont),
     ("BIG_IMAGE1", "Title", "Description text", "IconName1", "BackgroundColor", textColor, DescriptionColor, textFont, DescriptionFont)
   ][index]
 }

 func onboardingItemsCount() -> Int {
    return 3
  }

configuration contant item:

func onboardingConfigurationItem(item: OnboardingContentViewItem, index: Int) {

//    item.titleLabel?.backgroundColor = .redColor()
//    item.descriptionLabel?.backgroundColor = .redColor()
//    item.imageView = ...
  }

Demo

animation

License

paper-onboarding is released under the MIT license. See LICENSE for details.


Follow us for the latest updates
Twitter URL Twitter Follow

Keywords

iOS Swift Slider Infoslider Introslider Whatfix NPS Feedback Goal Goals Analytics Segment Segments Appcues Native Tools Tips

Tours Tips Modals Tool Tipcarousel Tooltips Walkthrough Walkme Guide Bridge Module Pointzi StreetHawk TipsModals Paper onBoard

Tooltiptooltip Tooltip

About

:octocat: PaperOnboarding is a material design UI slider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 97.9%
  • Objective-C 1.4%
  • Ruby 0.7%