Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Use Multiple Shadows With .foregroundStyle

Use Multiple Shadows With .foregroundStyle

Daily Coding Tip 166

Millie Sturgeon's avatar
Millie Sturgeon
Sep 04, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Use Multiple Shadows With .foregroundStyle
Share
person holding light bulb
Photo by Diego PH on Unsplash

It is possible to combine multiple shadows, because every type that conforms to ShapeStyle has this function provided by Apple:

extension ShapeStyle {
    public static func shadow(_ style: ShadowStyle) -> some ShapeStyle
}

In other words, any ShapeStyle can return a new ShapeStyle that has a shadow applied to it.

A shadow Sha…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share