All Projects → rootstrap → SwiftGradients

rootstrap / SwiftGradients

Licence: MIT license
Useful extensions for UIViews and CALayer classes to add beautiful color gradients.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to SwiftGradients

Hippolyte
HTTP Stubbing in Swift
Stars: ✭ 109 (+626.67%)
Mutual labels:  carthage, swift-package-manager, spm, swift5
BetterMappable
Better Mappable through Property Wrappers using ObjectMapper
Stars: ✭ 26 (+73.33%)
Mutual labels:  carthage, swift-package-manager, swift5
TVToday
iOS TV Shows app with TMDb Api. RxSwift, MVVM, Clean Architecture. Tuist + Swift Package Manager
Stars: ✭ 27 (+80%)
Mutual labels:  swift-package-manager, spm, swift5
Sketchkit
A lightweight auto-layout DSL library for iOS & tvOS.
Stars: ✭ 40 (+166.67%)
Mutual labels:  carthage, swift-package-manager, spm
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+373.33%)
Mutual labels:  uiview, swift-package-manager, spm
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+71926.67%)
Mutual labels:  carthage, swift-package-manager, gradients
MMActionSheet
An actionSheet view implement with pure swift
Stars: ✭ 25 (+66.67%)
Mutual labels:  swift-package-manager, spm, swift5
Match3Kit
Library for simple Match3 games.
Stars: ✭ 38 (+153.33%)
Mutual labels:  swift-package-manager, spm, swift5
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (+1340%)
Mutual labels:  carthage, swift-package-manager, spm
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+11780%)
Mutual labels:  carthage, swift-package-manager, swift5
Table
CLI tables in Swift
Stars: ✭ 53 (+253.33%)
Mutual labels:  swift-package-manager, spm, swift5
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (+360%)
Mutual labels:  swift-package-manager, spm, swift5
danger-swift-xcodesummary
A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report
Stars: ✭ 72 (+380%)
Mutual labels:  swift-package-manager, spm
AirPlay
Small framework that lets users track iOS AirPlay availability and extra features.
Stars: ✭ 46 (+206.67%)
Mutual labels:  carthage, swift-package-manager
Dots
Lightweight Concurrent Networking Framework
Stars: ✭ 35 (+133.33%)
Mutual labels:  carthage, swift-package-manager
Sqlable
Swift library for making storing data in a SQLite database simple and magic-free
Stars: ✭ 83 (+453.33%)
Mutual labels:  carthage, swift-package-manager
Validated
A rule-based validation framework
Stars: ✭ 31 (+106.67%)
Mutual labels:  carthage, swift-package-manager
YMFF
Feature management made easy.
Stars: ✭ 26 (+73.33%)
Mutual labels:  swift-package-manager, spm
awesome-ios
A collaborative list of awesome for iOS developers. Include quick preview.
Stars: ✭ 1,329 (+8760%)
Mutual labels:  spm, swift5
Columbus
A feature-rich country picker for iOS, tvOS and watchOS.
Stars: ✭ 23 (+53.33%)
Mutual labels:  carthage, spm

SwiftGradients

CI Status Version License Platform Carthage SPM Swift Version

What is it?

SwiftGradients gives you useful extensions for UIViews and CALayer classes to add beautiful color gradients.

Installation

1. Cocoapods

pod 'SwiftGradients', '~> 1.0.0'

2. Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. Add the following line to your Cartfile and follow the installation instructions.

github "rootstrap/SwiftGradients" ~> 1.0.0

3. Swift Package Manager

  • In XCode 11, go to File -> Swift Packages -> Add Package Dependency.
  • Enter the repo URL (https://github.com/rootstrap/SwiftGradients) and click Next.
  • Select the version rule desired (you can specify a version number, branch or commit) and click Next.
  • Finally, select the target where you want to use the framework.

That should be it. SwiftGradients should appear in the navigation panel as a dependency and the framework will be linked automatically to your target.

Note: It is always recommended to lock your external libraries to a specific version.

Usage

1. Adding gradients to your subviews

let gradientLayer = view.addGradient(
  colors: [.blue, .green],
  direction: .topToBottom
)

2. Customize options for your gradient

You can set a custom angle(measured in degrees and anti-clockwise), rather that one of the four predefined directions. Also, you can provide the color stop locations for better accuracy.

let gradientLayer = view.addGradient(
  colors: [.blue, .green, .black],
  angle: 45
  locations: [0, 50, 75]
)

Voilà


Example

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

License

SwiftGradients 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].