The iPhone mockup available here.
- iOS 8.0+
- Xcode 7.3
Just add the Source folder to your project.
or use CocoaPods with Podfile:
pod 'paper-onboarding', '~> 0.0.2'-
Create a new UIView inheriting from
PaperOnboarding -
Set itemsCount in attribute inspector
override func viewDidLoad() {
super.viewDidLoad()
let onboarding = PaperOnboarding(itemsCount: 3, dataSource: self)
onboarding.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(onboarding)
// add constratins
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)
}
}func onboardingItemAtIndex(index: Int) -> OnboardingItemInfo {
return [
("BIG_IMAGE1", "Hotels", "All hotels and hostels are sorted by hospitality rating"),
("BIG_IMAGE2", "Banks", "We carefully verify all banks before add them into the app"),
("BIG_IMAGE3", "Stores", "All local stores are categorized for your convenience")
][index]
}
func onboardingBackgroundColorItemAtIndex(index: Int) -> UIColor {
return [
UIColor(red:0.40, green:0.56, blue:0.71, alpha:1.00),
UIColor(red:0.40, green:0.69, blue:0.71, alpha:1.00),
UIColor(red:0.61, green:0.56, blue:0.74, alpha:1.00)][index]
}
func pageViewIconAtIndex(index: Int) -> UIImage? {
let imageNames = ["ICON1", "ICON2", "ICON3"]
return UIImage(asset: imageNames[index])
}paper-onboarding is released under the MIT license. See LICENSE for details.
Maintained by app development agency Ramotion Inc. See our other open-source projects or hire us to design, develop, and grow your product.

