A simple demo for CAGradientLayer in iOS
Swift
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
GradientLayer.xcodeproj
GradientLayer support iOS 10 Aug 26, 2016
License.txt Create License.txt Sep 1, 2016
README.md

README.md

A simple demo for CAGradientLayer

How can a gradient effect be created quickly and painlessly? There are actually three ways to achieve that. The first and least recommended way is to use images that contain the gradient effect. However the big disadvantage here is that you cannot change the gradient on the fly, unless you design and use a bunch of images representing various states of the gradient. That’s totally unproductive. The second way involves the use of Core Graphics techniques, but you need to have some knowledge about all that (for example the graphics context, color spaces, and more). Also, Core Graphics framework is addressed to more advanced users, so new developers might won’t like the idea of using it just to create a gradient effect. And that brings us to the third, super-fast and simplest approach: The use of a CAGradientLayer object.

For the full tutorial, you can check it out here:

http://www.appcoda.com/cagradientlayer

update : support iOS 10