Type Safely

Type Safely

Optional Views as @State Properties

Daily Coding Tip 059

Millie Sturgeon's avatar
Millie Sturgeon
Apr 12, 2022
∙ Paid
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 …

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture