Pastel 0.3.0

Pastel 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by DeviceLayout.


Downloads

Total8,342
Week1,338
Month4,899

Installs

Apps419
Apps WeekApps This Week 98
Pod Tries10
Test Targets26
Test WeekTests This week 11
powered by Segment

GitHub

Stars2,088
Watchers27
Forks89
Issues7
Contributors6
Pull Requests1

Code

Files2
LOCLines of Code 153


Pastel 0.3.0

  • By
  • cruz

Pastel

🎨 Gradient animation effect like Instagram

pastel_01.gif pastel_02.gif pastel_03.gif

Example

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)
}

🎨 Customize Graident Colors

Designed by Alexander Zaytsev, https://dribbble.com/anwaltzzz

Gradient.png

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Pastel is written in Swift 3. iOS 8.0+ Required

Installation

Pastel is available through CocoaPods or Carthage.

Author

cruz, [email protected]

License

Pastel is available under the MIT license. See the LICENSE file for more info.