December 10, 2017
Creating an IBDesignable Gradient View in Swift 4
This tutorial will demonstrate how to create a versatile, @IBDesignable gradient view class in Swift 4. You can drop the CAGradientView into storyboards and preview at design time, or add it programmatically. You can set the colours for two gradient stops (start and end), and easily set the gradient direction (in degrees), so you can easily have horizontal gradients,...