How To Initialise a View's Body Property With a Switch (and Why You Probably Shouldn't)
Daily Coding Tip 290
Last tested on Xcode 15 beta 1After my previous Daily Coding Tip, I was interested to know what the limitations of assigning a value to a property or variable.
The body in a SwiftUI view is usually a computed property, meaning it’s kinda like a function that returns the opaque type some View. If you know it’ll be the same …


