Latest 5.0.0
Homepage https://github.com/Ramotion/paper-onboarding
License MIT
Platforms ios 8.0, tvos 9.0
Authors

header

paper-onboarding

Twitter
CocoaPods
CocoaPods
Carthage compatible
Travis
codebeat badge
Donate

Check this library on other platforms:


paper-onboarding

Looking for developers for your project?
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.


paper-onboarding

The iPhone mockup available here.

Requirements

  • iOS 10.0+
  • Xcode 9

Installation

Just add the Source folder to your project.

or use CocoaPods with Podfile:

pod 'paper-onboarding'

or Carthage users can simply add to their Cartfile:

github "Ramotion/paper-onboarding"

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 onboardingItem(at index: Int) -> OnboardingItemInfo {

   return [
     OnboardingItemInfo(informationImage: IMAGE,
                                   title: "title",
                             description: "description",
                                pageIcon: IMAGE,
                                   color: UIColor.RANDOM,
                              titleColor: UIColor.RANDOM,
                        descriptionColor: UIColor.RANDOM,
                               titleFont: UIFont.FONT,
                         descriptionFont: UIFont.FONT),

     OnboardingItemInfo(informationImage: IMAGE,
                                    title: "title",
                              description: "description",
                                 pageIcon: IMAGE,
                                    color: UIColor.RANDOM,
                               titleColor: UIColor.RANDOM,
                         descriptionColor: UIColor.RANDOM,
                                titleFont: UIFont.FONT,
                          descriptionFont: UIFont.FONT),

    OnboardingItemInfo(informationImage: IMAGE,
                                 title: "title",
                           description: "description",
                              pageIcon: IMAGE,
                                 color: UIColor.RANDOM,
                            titleColor: UIColor.RANDOM,
                      descriptionColor: UIColor.RANDOM,
                             titleFont: UIFont.FONT,
                       descriptionFont: UIFont.FONT)
     ][index]
 }

 func onboardingItemsCount() -> Int {
    return 3
  }

configuring content item:

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

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

This library is a part of a selection of our best UI open-source projects.

License

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

Get the Showroom App for iOS to give it a try

Try this UI component and more like this in our iOS app. Contact us if interested.


paper-onboarding


paper-onboarding

Follow us for the latest updates

paper-onboarding

Latest podspec

{
    "name": "paper-onboarding",
    "version": "5.0.0",
    "summary": "Amazing onboarding.",
    "license": "MIT",
    "homepage": "https://github.com/Ramotion/paper-onboarding",
    "authors": {
        "Juri Vasylenko": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/Ramotion/paper-onboarding.git",
        "tag": "5.0.0"
    },
    "source_files": "Source/**/*.swift"
}

Pin It on Pinterest

Share This