Type Safely

Type Safely

Create a Default View Body To Apply When One Is Not Provided

Daily Coding Tip 195

Type Safely's avatar
Type Safely
Oct 15, 2022
∙ Paid
landscape photo of mountain
Photo by Cristina Gottardi on Unsplash

I often set properties up in a SwiftUI before I get around to the body property required by the View protocol.

In many previous Daily Coding Tips I got around this by declaring my ContentView type without conforming to the protocol, and later adding View conformance in an extension. Another way to deal with this mig…

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