skip to Main Content

Xcode – SwiftUI List selection always nil

In my macOS app project, I have a SwiftUI List view of NavigationLinks build with a foreach loop from an array of items: struct MenuView: View { @EnvironmentObject var settings: UserSettings var body: some View { List(selection: $settings.selectedWeek) { ForEach(settings.weeks)…

VIEW QUESTION
Back To Top
Search