MoonWalker
由 yhkaplan 提供。
简介
MoonWalker 是一个易于使用的引导库。
用法
import MoonWalker
// ...
需求
- iOS 11.0+
- Xcode 11.0+
参与
- 如果您 希望贡献,请随时 提交拉取请求。
- 如果您 有功能请求,请 打开一个问题。
在贡献之前,请检查CONTRIBUTING文件以获取更多信息。
使用方法
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let views = [0, 1, 2].map { index -> MWChildViewModel in
let upperLabel = MWUpperLabelSettings(text: "Screen \(index)")
let image = UIImage(named: "screen\(index)")
let backgroundImage = MWBackgroundImageSettings(image: image)
return MWChildViewModel(upperLabel: upperLabel, backgroundImage: backgroundImage)
}
let creator = MWParentViewCreator(childViews: views)
let walkthroughVC = creator.getParentViewController()
window!.rootViewController = walkthroughVC
window!.makeKeyAndVisible()
return true
}
示例
按照以下3个步骤运行示例项目:克隆MoonWalker仓库,打开MoonWalker工作区,并运行示例项目。
安装
- 如果您在安装过程中遇到问题,那可能是由于不兼容最新文件格式的旧版Sourcery造成的。为了解决这个问题,请执行以下操作:a) 升级;b) 删除sourcery。
Swift包管理器
以通常的方式通过Xcode添加
CocoaPods
CocoaPods是Cocoa项目的依赖管理工具。
要安装MoonWalker,只需将以下行添加到您的Podfile中
pod 'MoonWalker', '~> 1.0'
Carthage
Carthage 是用于 Cocoa 的简单、去中心化的依赖管理器。
要安装 MoonWalker,只需将以下行添加到您的 Cartfile 中。
github "yhkaplan/MoonWalker" ~> 1.0
作者
变更日志
请参阅 CHANGELOG。