News for hackers. Stuff that matters.
Re:Static Types in SwiftUI by Razengan on Tuesday November 05, 2019 @06:50PM (#21458214)
I love the extension idea, noting that for later. :)

But I do need to be able to change the view during runtime, so I settled on just type-erasing to AnyView for now.

Re:Static Types in SwiftUI by lilyball on Tuesday November 05, 2019 @07:57PM (#21458690)
If you have a set number of possible view types you could in theory have it hold onto an enum of the different types.