Adds a shadow to the view.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
Parameters
color
The shadow’s color.
radius
The shadow’s size.
x
A horizontal offset you use to position the shadow relative to this view.
y
A vertical offset you use to position the shadow relative to this view.
Return Value
A view that adds a shadow to this view.