Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Optional Views as @State Properties

Optional Views as @State Properties

Daily Coding Tip 059

Millie Sturgeon's avatar
Millie Sturgeon
Apr 12, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Optional Views as @State Properties
Share
Image by David Schwarzenberg from Pixabay

There are aspects of SwiftUI that pose a challenge.

The some View opaque return type requires that one specific type ends up being returned. Often this is a VStack or an HStack, layout containers that lay their children out vertically or horizontally respectively. Although you may have noticed that it’s possible …

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