彩色图案 0.6.0

彩色图案 0.6.0

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2019年7月
SPM支持 SPM

DeviceLayout维护。



  • 作者:
  • cruz

彩色图案

🎨Instagram 类似渐变动画效果

Awesome Swift CI Status Version License Platform Carthage compatible

pastel_01.gif pastel_02.gif pastel_03.gif

示例

override func viewDidLoad() {
    super.viewDidLoad()

    let pastelView = PastelView(frame: view.bounds)

    // Custom Direction
    pastelView.startPastelPoint = .bottomLeft
    pastelView.endPastelPoint = .topRight

    // Custom Duration
    pastelView.animationDuration = 3.0

    // Custom Color
    pastelView.setColors([UIColor(red: 156/255, green: 39/255, blue: 176/255, alpha: 1.0),
                          UIColor(red: 255/255, green: 64/255, blue: 129/255, alpha: 1.0),
                          UIColor(red: 123/255, green: 31/255, blue: 162/255, alpha: 1.0),
                          UIColor(red: 32/255, green: 76/255, blue: 255/255, alpha: 1.0),
                          UIColor(red: 32/255, green: 158/255, blue: 255/255, alpha: 1.0),
                          UIColor(red: 90/255, green: 120/255, blue: 127/255, alpha: 1.0),
                          UIColor(red: 58/255, green: 255/255, blue: 217/255, alpha: 1.0)])

    pastelView.startAnimation()
    view.insertSubview(pastelView, at: 0)
}

🎨自定义渐变颜色

由 Alexander Zaytsev 设计,https://dribbble.com/anwaltzzz

Gradient.png

要运行示例项目,请克隆仓库并首先从 Example 目录运行 pod install

要求

彩色图案是用 Swift 3+ 编写的。需要 iOS 8.0+

安装

彩色图案通过 CocoaPodsCarthage 提供。

Cocoapods

pod "Pastel"

Carthage

github "cruisediary/Pastel" ~> 0.5.1

示例

  • Passcode:一个简单的使用RxSwift, ReactorKit, IGListKit和Pastel的Passcode应用程序

强大

  • awesome-swift - 一份优秀的Swift库和资源的共享列表。欢迎贡献!
  • awesome-gradient - 🌈精选优秀梯度框架、库和软件及相关资源列表

作者

cruz, [email protected]

感谢

感谢本项目贡献者

许可证

Pastel适用于MIT许可证。有关更多信息,请参阅LICENSE文件。