ShadowTransform
public class ShadowTransform : Transform
Applies a shadow border effect to the image.
-
Initializes a
ShadowTransformobject.Declaration
Swift
public init()
-
Adds the
bluroption.Declaration
Swift
@discardableResult func blur(_ value: Int) -> SelfParameters
valueSets the level of blur for the shadow effect. Valid range:
0...20 -
Adds the
opacityoption.Declaration
Swift
@discardableResult func opacity(_ value: Int) -> SelfParameters
valueSets the opacity level of the shadow effect. Vaid range:
0 to 100 -
Adds the
vectoroption.Declaration
Swift
@discardableResult func vector(x: Int, y: Int) -> SelfParameters
xSets the shadow’s X offset. Valid range:
-1000 to 1000ySets the shadow’s Y offset. Valid range:
-1000 to 1000 -
Adds the
coloroption.Declaration
Swift
@discardableResult func color(_ value: UIColor) -> SelfParameters
valueSets the shadow color.
-
Adds the
backgroundoption.Declaration
Swift
@discardableResult func background(_ value: UIColor) -> SelfParameters
valueSets the background color to display behind the image, like a matte the shadow is cast on.
View on GitHub
ShadowTransform Class Reference