{"id":1187,"url":"https://github.com/rwbutler/AnimatedGradientView","last_synced_at":"2025-07-30T20:32:44.069Z","repository":{"id":52443962,"uuid":"171845715","full_name":"rwbutler/AnimatedGradientView","owner":"rwbutler","description":"🎞 Powerful gradient animations made simple for iOS.","archived":false,"fork":false,"pushed_at":"2023-03-09T14:12:56.000Z","size":2520,"stargazers_count":454,"open_issues_count":2,"forks_count":30,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-11-20T05:53:46.164Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://medium.com/@rwbutler/animated-gradients-on-ios-aa117551e533","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwbutler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-21T09:54:01.000Z","updated_at":"2024-09-16T15:36:13.000Z","dependencies_parsed_at":"2024-01-02T21:08:18.230Z","dependency_job_id":null,"html_url":"https://github.com/rwbutler/AnimatedGradientView","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":0.09615384615384615,"last_synced_commit":"ffb04a49a51c7368a80e1b2da06c0e15a7d8ec2c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbutler%2FAnimatedGradientView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbutler%2FAnimatedGradientView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbutler%2FAnimatedGradientView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwbutler%2FAnimatedGradientView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwbutler","download_url":"https://codeload.github.com/rwbutler/AnimatedGradientView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228187550,"owners_count":17882324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-01-05T20:15:40.823Z","updated_at":"2024-12-04T20:31:03.225Z","avatar_url":"https://github.com/rwbutler.png","language":"Swift","funding_links":[],"categories":["Graphics","Swift"],"sub_categories":["Getting Started","Linter"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/animated-gradient-view-large-logo.png\" alt=\"Animated Gradient View Logo\"\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"800\" src=\"https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/animated-gradient-view-text-banner.png\" alt=\"Animated Gradient View\"\u003e\n\u003c/div\u003e\n\n[![CI Status](https://img.shields.io/travis/rwbutler/AnimatedGradientView.svg?style=flat)](https://travis-ci.org/rwbutler/AnimatedGradientView)\n[![Version](https://img.shields.io/cocoapods/v/AnimatedGradientView.svg?style=flat)](https://cocoapods.org/pods/AnimatedGradientView)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a1bfd17cceb7ca5770b3/maintainability)](https://codeclimate.com/github/rwbutler/AnimatedGradientView/maintainability)\n[![License](https://img.shields.io/cocoapods/l/AnimatedGradientView.svg?style=flat)](https://cocoapods.org/pods/AnimatedGradientView)\n[![Platform](https://img.shields.io/cocoapods/p/AnimatedGradientView.svg?style=flat)](https://cocoapods.org/pods/AnimatedGradientView)\n[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org/)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n\nAnimatedGradientView is a UIView subclass which makes it simple to add animated gradients to your iOS app. It is written purely in Swift. [Further documentation available as part of this blog post](https://medium.com/@rwbutler/animated-gradients-on-ios-aa117551e533).\n\n## Features\n\n- [x] Easily create animated or static gradients.\n- [x] Configurable gradient direction.\n- [x] Use hex values, RGB values or names to specify colors (including color names specified in asset catalogs on iOS 11 or higher).\n- [x] Supports animating between gradients with a varying number of colors.\n- [x] Supports axial, radial and on iOS 12, conic gradients.\n- [x] Auto-animate or animate manually using the `startAnimating` and `stopAnimating` functions.\n- [x] Loop animations with the `autoRepeat` property.\n\n![Example](https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/example.gif)\n\nTo learn more about how to use AnimatedGradientView, check out the [blog post](https://medium.com/@rwbutler/animated-gradients-on-ios-aa117551e533), take a look at the [example app](./Example/), the demo over on [Appetize.io](https://appetize.io/app/ytxjjp34nxxuac0cm95rf7nbvm?device=iphonexsmax\u0026scale=75\u0026orientation=portrait\u0026osVersion=12.1), or make use of the table of contents below:\n\n- [Features](#features)\n- [Quickstart](#quickstart)\n- [Requirements](#requirements)\n- [Installation](#installation)\n\t- [Cocoapods](#cocoapods)\n\t- [Carthage](#carthage)\n- [Usage](#usage)\n\t- [Static Gradient](#static-gradients)\n\t    - [Gradient Types](#gradient-types)\n- [Author](#author)\n- [License](#license)\n- [Additional Software](#additional-software)\n\t- [Frameworks](#frameworks)\n\t- [Tools](#tools)\n\n## What's new in AnimatedGradientView 3.0.0?\n\nAnimatedGradientView 3.0.0 provides support for Xcode 12 and raises the minimum deployment target to iOS 9 (dropping support for iOS 8).\n\n## Quickstart\n\nCreating and adding a new `AnimatedGradientView` as a subview is as simple as follows:\n\n```swift\nlet animatedGradient = AnimatedGradientView(frame: view.bounds)\nanimatedGradient.direction = .up\nanimatedGradient.animationValues = [(colors: [\"#2BC0E4\", \"#EAECC6\"], .up, .axial),\n(colors: [\"#833ab4\", \"#fd1d1d\", \"#fcb045\"], .right, .axial),\n(colors: [\"#003973\", \"#E5E5BE\"], .down, .axial),\n(colors: [\"#1E9600\", \"#FFF200\", \"#FF0000\"], .left, .axial)]\nview.addSubview(animatedGradient)\n```\n\nYou'll also need to remember to import the framework using `import AnimatedGradientView`.\n\n## Requirements\nAnimatedGradientView is written in Swift 5.0 and is available on iOS 8.0 or higher.\n\n## Installation\n\n### Cocoapods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager which integrates dependencies into your Xcode workspace. To install it using [RubyGems](https://rubygems.org/) run:\n\n```bash\ngem install cocoapods\n```\n\nTo install AnimatedGradientView using Cocoapods, simply add the following line to your Podfile:\n\n```ruby\npod \"AnimatedGradientView\"\n```\n\nThen run the command:\n\n```bash\npod install\n```\n\nFor more information [see here](https://cocoapods.org/#getstarted).\n\n### Carthage\n\nCarthage is a dependency manager which produces a binary for manual integration into your project. It can be installed via [Homebrew](https://brew.sh/) using the commands:\n\n```bash\nbrew update\nbrew install carthage\n```\n\nIn order to integrate AnimatedGradientView into your project via Carthage, add the following line to your project's Cartfile:\n\n```ogdl\ngithub \"rwbutler/AnimatedGradientView\"\n```\n\nFrom the macOS Terminal run `carthage update --platform iOS` to build the framework then drag `AnimatedGradientView.framework` into your Xcode project.\n\nFor more information [see here](https://github.com/Carthage/Carthage#quick-start).\n\n### Swift Package Manager\n\nSwift Package Manager is a dependency manager built right into Xcode 11 and higher. From the File menu, add a new Swift Package dependency to your project and paste in this project's Git URL.\n\n## Usage\n### Static Gradients\n\nIf all you need is a gradient without animation this is easily achieved by setting the `colors` property to an array of `UIColor` as follows:\n\n```swift\nlet gradient = AnimatedGradientView(frame: view.bounds)\ngradient.colors = [[UIColor.blue, UIColor.red]]\ngradient.direction = .up\nview.addSubview(gradient)\n```\n\nThe `colors` property is actually an array of `UIColor` arrays. If further `UIColor` arrays are specified then animation will occur between them. Using the `direction` property it also possible to define the direction of the gradient.\n\nIf it is more convenient to work with hex color strings rather than `UIColor` then make use of the `colorStrings` property instead as follows:\n\n```swift\nlet gradient = AnimatedGradientView(frame: view.bounds)\ngradient.colorStrings = [[\"#3224AE\", \"#FF66FF\"]]\ngradient.direction = .up\nview.addSubview(gradient)\n```\n\n#### Gradient Types\n\nAnimatedGradientView supports three types of gradients which can be set using the `type` property.\n\n```swift\nlet gradient = AnimatedGradientView(frame: view.bounds)\ngradient.autoAnimate = false\ngradient.colorStrings = [[\"#3224AE\", \"#FF66FF\"]]\ngradient.type = .axial\nview.addSubview(gradient)\n```\n\nThe three gradient types supported are:\n\n##### Axial\nThis is your standard linear gradient blending between color stops from the start point to the end point.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/axial.png\" alt=\"Axial Gradient\"\u003e\n\u003c/div\u003e\n\n#### Radial\n\n The gradient appears to radiate outwards from the start point (at the center) towards the end point in a circular fashion blending between the color stops from the start point to end point as with a linear gradient.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/radial.png\" alt=\"Radial Gradient\"\u003e\n\u003c/div\u003e\n\n#### Conic\n\n This type of gradient is only available from iOS 12 onwards. It is similar to a radial gradient in that the start point represents the center of the circle and the end point represents a point on the outer edge. However, whilst a radial gradient blends between color stops from the start point to the end point (from the center to the outer edge), a conic gradient places the color stops along the outer edge of the circle blending between the color stops from 0 degrees to 360 degrees.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"200\" height=\"200\" src=\"https://github.com/rwbutler/AnimatedGradientView/raw/main/docs/images/conic.png\" alt=\"Conic Gradient\"\u003e\n\u003c/div\u003e\n\n## Author\n\n[Ross Butler](https://github.com/rwbutler)\n\n## License\n\nAnimatedGradientView is available under the MIT license. See the [LICENSE file](./LICENSE) for more info.\n\n## Additional Software\n\n### Controls\n\n* [AnimatedGradientView](https://github.com/rwbutler/AnimatedGradientView) - Powerful gradient animations made simple for iOS.\n\n|[AnimatedGradientView](https://github.com/rwbutler/AnimatedGradientView) |\n|:-------------------------:|\n|[![AnimatedGradientView](https://raw.githubusercontent.com/rwbutler/AnimatedGradientView/main/docs/images/animated-gradient-view-logo.png)](https://github.com/rwbutler/AnimatedGradientView) \n\n### Frameworks\n\n* [Cheats](https://github.com/rwbutler/Cheats) - Retro cheat codes for modern iOS apps.\n* [Connectivity](https://github.com/rwbutler/Connectivity) - Improves on Reachability for determining Internet connectivity in your iOS application.\n* [FeatureFlags](https://github.com/rwbutler/FeatureFlags) - Allows developers to configure feature flags, run multiple A/B or MVT tests using a bundled / remotely-hosted JSON configuration file.\n* [FlexibleRowHeightGridLayout](https://github.com/rwbutler/FlexibleRowHeightGridLayout) - A UICollectionView grid layout designed to support Dynamic Type by allowing the height of each row to size to fit content.\n* [Hash](https://github.com/rwbutler/Hash) - Lightweight means of generating message digests and HMACs using popular hash functions including MD5, SHA-1, SHA-256.\n* [Skylark](https://github.com/rwbutler/Skylark) - Fully Swift BDD testing framework for writing Cucumber scenarios using Gherkin syntax.\n* [TailorSwift](https://github.com/rwbutler/TailorSwift) - A collection of useful Swift Core Library / Foundation framework extensions.\n* [TypographyKit](https://github.com/rwbutler/TypographyKit) - Consistent \u0026 accessible visual styling on iOS with Dynamic Type support.\n* [Updates](https://github.com/rwbutler/Updates) - Automatically detects app updates and gently prompts users to update.\n\n|[Cheats](https://github.com/rwbutler/Cheats) |[Connectivity](https://github.com/rwbutler/Connectivity) | [FeatureFlags](https://github.com/rwbutler/FeatureFlags) | [Skylark](https://github.com/rwbutler/Skylark) | [TypographyKit](https://github.com/rwbutler/TypographyKit) | [Updates](https://github.com/rwbutler/Updates) |\n|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|\n|[![Cheats](https://raw.githubusercontent.com/rwbutler/Cheats/main/docs/images/cheats-logo.png)](https://github.com/rwbutler/Cheats) |[![Connectivity](https://github.com/rwbutler/Connectivity/raw/main/ConnectivityLogo.png)](https://github.com/rwbutler/Connectivity) | [![FeatureFlags](https://raw.githubusercontent.com/rwbutler/FeatureFlags/master/docs/images/feature-flags-logo.png)](https://github.com/rwbutler/FeatureFlags) | [![Skylark](https://github.com/rwbutler/Skylark/raw/master/SkylarkLogo.png)](https://github.com/rwbutler/Skylark) | [![TypographyKit](https://raw.githubusercontent.com/rwbutler/TypographyKit/master/docs/images/typography-kit-logo.png)](https://github.com/rwbutler/TypographyKit) | [![Updates](https://raw.githubusercontent.com/rwbutler/Updates/master/docs/images/updates-logo.png)](https://github.com/rwbutler/Updates)\n\n### Tools\n\n* [Clear DerivedData](https://github.com/rwbutler/ClearDerivedData) - Utility to quickly clear your DerivedData directory simply by typing `cdd` from the Terminal.\n* [Config Validator](https://github.com/rwbutler/ConfigValidator) - Config Validator validates \u0026 uploads your configuration files and cache clears your CDN as part of your CI process.\n* [IPA Uploader](https://github.com/rwbutler/IPAUploader) - Uploads your apps to TestFlight \u0026 App Store.\n* [Palette](https://github.com/rwbutler/TypographyKitPalette) - Makes your [TypographyKit](https://github.com/rwbutler/TypographyKit) color palette available in Xcode Interface Builder.\n\n|[Config Validator](https://github.com/rwbutler/ConfigValidator) | [IPA Uploader](https://github.com/rwbutler/IPAUploader) | [Palette](https://github.com/rwbutler/TypographyKitPalette)|\n|:-------------------------:|:-------------------------:|:-------------------------:|\n|[![Config Validator](https://raw.githubusercontent.com/rwbutler/ConfigValidator/master/docs/images/config-validator-logo.png)](https://github.com/rwbutler/ConfigValidator) | [![IPA Uploader](https://raw.githubusercontent.com/rwbutler/IPAUploader/master/docs/images/ipa-uploader-logo.png)](https://github.com/rwbutler/IPAUploader) | [![Palette](https://raw.githubusercontent.com/rwbutler/TypographyKitPalette/master/docs/images/typography-kit-palette-logo.png)](https://github.com/rwbutler/TypographyKitPalette)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbutler%2FAnimatedGradientView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwbutler%2FAnimatedGradientView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwbutler%2FAnimatedGradientView/lists"}