Class
ShadowTransform
public class ShadowTransform: Transform
Applies a shadow border effect to the image.
Relationships
Superclass
Transform:nodoc:
Initializers
Methods
blur(_:)
@discardableResult
func blur(_ value: Int) -> Self
Adds the blur option.
Parameters
| Name | Type | Description |
|---|---|---|
| value | Int |
Sets the level of blur for the shadow effect. Valid range: |
opacity(_:)
@discardableResult
func opacity(_ value: Int) -> Self
Adds the opacity option.
Parameters
| Name | Type | Description |
|---|---|---|
| value | Int |
Sets the opacity level of the shadow effect. Vaid range: |
vector(x:y:)
@discardableResult
func vector(x: Int, y: Int) -> Self
Adds the vector option.
Parameters
| Name | Type | Description |
|---|---|---|
| x | Int |
Sets the shadow's X offset. Valid range: |
| y | Int |
Sets the shadow's Y offset. Valid range: |
color(_:)
@discardableResult
func color(_ value: UIColor) -> Self
Adds the color option.
Parameters
| Name | Type | Description |
|---|---|---|
| value | UIColor |
Sets the shadow color. |
background(_:)
@discardableResult
func background(_ value: UIColor) -> Self
Adds the background option.
Parameters
| Name | Type | Description |
|---|---|---|
| value | UIColor |
Sets the background color to display behind the image, like a matte the shadow is cast on. |