paper-onboarding-pointzi 2.0.6

paper-onboarding-pointzi 2.0.6

测试已测试
语言语言 SwiftSwift
许可 MIT
发布最新发布2022年2月
SPM支持 SPM

Maintained by Streethawk.



  • By
  • StreetHawk

header
animation

paper-onboarding

Twitter
CocoaPods
CocoaPods
Carthage compatible
Travis
codebeat badge

关于

该项目由 Ramotion, Inc. 维护。

我们专注于为移动应用程序和网站设计和编写定制 UI。

正在寻找您的项目开发者吗?

该项目由 Ramotion, Inc. 维护。我们专注于为移动应用程序和网站设计和编写定制 UI。


可在 此处 获得的 iPhone 模拟器

要求

  • iOS 10.0+
  • Xcode 8

安装

只需将 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"

使用方法

Storyboard

  1. 创建一个新的 UIView,它继承自 PaperOnboarding

  2. 在属性检查器中设置 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)
  }
}

要添加内容,请使用 dataSource 方法

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


获取 Showroom App 以进行尝试

尝试我们的 iOS 应用程序中的此 UI 组件和其他类似组件。如果您感兴趣,请与我们联系。



关注我们以获取最新更新

Twitter URL
Twitter Follow