All Projects → kgellci → Shift

kgellci / Shift

Licence: mit
Animate gradient changes with time or motion for iOS Swift

Programming Languages

swift
15916 projects
swift3
66 projects

Projects that are alternatives of or similar to Shift

Kdintroview
Stars: ✭ 300 (+81.82%)
Mutual labels:  swift-framework, ios-animation
Timliu Ios
iOS开发常用三方库、插件、知名博客等等
Stars: ✭ 10,898 (+6504.85%)
Mutual labels:  swift-framework, ios-animation
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+615.15%)
Mutual labels:  swift-framework, ios-animation
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (+44.24%)
Mutual labels:  ios-animation, gradient
Awesome Ios
A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects
Stars: ✭ 38,720 (+23366.67%)
Mutual labels:  swift-framework, ios-animation
Mrefresh
This pod enables you to add pull-to-refresh mechanism to your scrollviews and tableviews and use svg patterns in your refreshing view's layers.
Stars: ✭ 123 (-25.45%)
Mutual labels:  ios-animation
Colorbands
Unity 3D's Gradient is a handy data type but comes with some limitations: for example you cannot set more than 8 color keys in its editor and RGB is the only color space available. ColorBand data type offers an alternative with less limitations. Creating ColorBands is fun and easy; they are stored as assets and can be accessed from code through an Evaluate method to get the color at time t, as for Gradient. RGB (or HSV) values are described by individual curves, allowing a better control over how the color function evolves between your points. Color bands are used in all kinds of applications including games, data visualization and other fields.
Stars: ✭ 137 (-16.97%)
Mutual labels:  gradient
Gradientappbar
Gradient app bar for Flutter
Stars: ✭ 118 (-28.48%)
Mutual labels:  gradient
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+6447.88%)
Mutual labels:  ios-animation
Mkgradientview
🌈 Highly customizable Core Graphics based gradient view for iOS
Stars: ✭ 159 (-3.64%)
Mutual labels:  gradient
Swiftsh
A Swift SSH framework that wraps libssh2.
Stars: ✭ 148 (-10.3%)
Mutual labels:  swift-framework
Mastodonkit
MastodonKit is a Swift Framework that wraps Mastodon's API
Stars: ✭ 134 (-18.79%)
Mutual labels:  swift-framework
Gradstop
JavaScript micro library to generate gradient color stops 🏳️‍🌈
Stars: ✭ 144 (-12.73%)
Mutual labels:  gradient
Downloadbutton
Customizable App Store style download button
Stars: ✭ 1,532 (+828.48%)
Mutual labels:  ios-animation
Wobbly
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.
Stars: ✭ 150 (-9.09%)
Mutual labels:  ios-animation
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (-29.09%)
Mutual labels:  swift-framework
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+1033.33%)
Mutual labels:  swift-framework
Swiftywebrtc
Swift Framework for WebRTC
Stars: ✭ 147 (-10.91%)
Mutual labels:  swift-framework
Contentful.swift
A delightful Swift interface to Contentful's content delivery API.
Stars: ✭ 132 (-20%)
Mutual labels:  swift-framework
React Native Css Gradient
React Native css gradients - react-native-linear-gradient with css gradient support
Stars: ✭ 129 (-21.82%)
Mutual labels:  gradient

Shift

Swift Platform CI Status Version License Platform

Shift_gif.gif handle_logo_gradient.gif

Inspired by Pastel: https://github.com/cruisediary/Pastel

Shift allows you to do gradient color animations on your UI using either a timed animation or the device tilting motion.

You can also easily mask the gradient animation to images or text. Couple this with the motion based animation and you will get an effect similar to the Robinhood app.

Example

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

let view = ShiftView()

// set colors
view.setColors([UIColor.orange,
UIColor.red,
UIColor.blue,
UIColor.purple])

// set animation duration
view.animationDuration(3.0)

// start animation
view.startTimedAnimation()

You can also start a motion based animation. The device accelerometer is used to shift the color as the device is tilted. Note that accelerometers are not available is the simulator.

view.startMotionAnimation()

You can instantate a Button and animate the gradient color on the text only

This is similar to the gold reflection animations in the Robinhood app

shift_gold_gif.gif

let button = ShiftButton()
button.setTitle("Hello!", for: .normal)

// Custom gradient direction
button.start(shiftPoint: .topLeft)
button.end(shiftPoint: .bottomRight)

// Show the gradient on the text only
button.maskToText = true
button.startMotionAnimation()

Here is a list of available UI Classes

ShiftView()

// maskable to text or image
ShiftButton()

ShiftLabel()

// Maskable to text
ShiftMaskableLabel()

ShiftTextfield()

ShiftTextView()

// Maskable to image
ShiftImageView()

Each UI class has an Objective-C equivalent, just add _Objc to the class name, ShiftView_Objc

Requirements

Swift 4.0, iOS 8. Compatible with Obj-c

Installation

Shift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Shift"

Author

kgellci, [email protected], @kgellci

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].