One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

ShadowStyle

struct · iOS 16.0+ · SDK 27.1

struct ShadowStyle

A style to use when rendering shadows.

Members (2)

static · iOS 16.0+

drop

TypeScript
static drop(color: Color, radius: number, x?: number, y?: number): ShadowStyle
Swift declaration
static func drop(color: Color = .init(.sRGBLinear, white: 0, opacity: 0.33), radius: CGFloat, x: CGFloat = 0, y: CGFloat = 0) -> ShadowStyle

Creates a custom drop shadow style. Drop shadows draw behind the source content by blurring, tinting and offsetting its per-pixel alpha values. - 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. - Returns: A new shadow style.

static · iOS 16.0+

inner

TypeScript
static inner(color: Color, radius: number, x?: number, y?: number): ShadowStyle
Swift declaration
static func inner(color: Color = .init(.sRGBLinear, white: 0, opacity: 0.55), radius: CGFloat, x: CGFloat = 0, y: CGFloat = 0) -> ShadowStyle

Creates a custom inner shadow style. Inner shadows draw on top of the source content by blurring, tinting, inverting and offsetting its per-pixel alpha values. - 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. - Returns: A new shadow style.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →