ShadowTransform
public class ShadowTransform : Transform
Applies a shadow border effect to the image.
-
Initializes a
ShadowTransform
object.Declaration
Swift
public init()
-
Adds the
blur
option.Declaration
Swift
@discardableResult func blur(_ value: Int) -> Self
Parameters
value
Sets the level of blur for the shadow effect. Valid range:
0...20
-
Adds the
opacity
option.Declaration
Swift
@discardableResult func opacity(_ value: Int) -> Self
Parameters
value
Sets the opacity level of the shadow effect. Vaid range:
0 to 100
-
Adds the
vector
option.Declaration
Swift
@discardableResult func vector(x: Int, y: Int) -> Self
Parameters
x
Sets the shadow’s X offset. Valid range:
-1000 to 1000
y
Sets the shadow’s Y offset. Valid range:
-1000 to 1000
-
Adds the
color
option.Declaration
Swift
@discardableResult func color(_ value: UIColor) -> Self
Parameters
value
Sets the shadow color.
-
Adds the
background
option.Declaration
Swift
@discardableResult func background(_ value: UIColor) -> Self
Parameters
value
Sets the background color to display behind the image, like a matte the shadow is cast on.