May 30, 2020
Sometimes it would be nice to use a picker view in SwiftUI that is automatically mapped to an enum, presenting the enum cases as its options and binding the selection directly to a property of the desired enum type. Here's one way of implementing such a picker view.