测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最新发布 | 2022年2月 |
SPM支持 SPM | ✗ |
Maintained by Streethawk.
该项目由 Ramotion, Inc. 维护。
我们专注于为移动应用程序和网站设计和编写定制 UI。
正在寻找您的项目开发者吗?
该项目由 Ramotion, Inc. 维护。我们专注于为移动应用程序和网站设计和编写定制 UI。
可在 此处 获得的 iPhone 模拟器。
只需将 Source 文件夹添加到您的项目中。
或使用 CocoaPods 和 Podfile
pod 'paper-onboarding', '~> 1.1.3' swift 2.2
pod 'paper-onboarding', '~> 2.0.1' swift 3
或 Carthage 用户只需将其添加到他们的 Cartfile
github "Ramotion/paper-onboarding"
创建一个新的 UIView,它继承自 PaperOnboarding
在属性检查器中设置 dataSource
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)
}
}
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
}
func onboardingConfigurationItem(item: OnboardingContentViewItem, index: Int) {
// item.titleLabel?.backgroundColor = .redColor()
// item.descriptionLabel?.backgroundColor = .redColor()
// item.imageView = ...
}
paper-onboarding 根据 MIT 许可证发布。
有关详细信息,请参阅 LICENSE
尝试我们的 iOS 应用程序中的此 UI 组件和其他类似组件。如果您感兴趣,请与我们联系。