I'm trying to use the new conic gradient type. I've set the deployment target to 12.0 and added the QuartzCore framework, and I'm setting the type of a gradient to .conic
:
let gradient = CAGradientLayer()
gradient.type = CAGradientLayerType.conic
I can even click through to the documentation:
extension CAGradientLayerType {
...
/* Conic gradient. The gradient is centered at 'startPoint' and its 0-degrees
* direction is defined by a vector spanned between 'startPoint' and
* 'endPoint'. When 'startPoint' and 'endPoint' overlap the results are
* undefined. The gradient's angle increases in the direction of rotation of
* positive x-axis towards positive y-axis. */
@available(iOS 12.0, *)
public static let conic: CAGradientLayerType
}
but I'm still getting this build error:
Type 'CAGradientLayerType' (aka 'NSString') has no member 'conic'