https://github.com/appcoda/gradientlayer
A simple demo for CAGradientLayer in iOS
https://github.com/appcoda/gradientlayer
Last synced: 2 months ago
JSON representation
A simple demo for CAGradientLayer in iOS
- Host: GitHub
- URL: https://github.com/appcoda/gradientlayer
- Owner: appcoda
- License: mit
- Created: 2016-07-26T02:24:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-01T08:11:23.000Z (almost 9 years ago)
- Last Synced: 2024-04-17T04:08:06.801Z (about 1 year ago)
- Language: Swift
- Homepage: http://www.appcoda.com/cagradientlayer
- Size: 28.3 KB
- Stars: 33
- Watchers: 6
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# 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