↧
Answer by green_knight for SwiftUI build a list using enums
You don't need Identifiable here. I've added selections as well, because why not:enum Whatever: String, CaseIterable { case one case two}struct ContentView: View { @Binding var selection: Whatever? var...
View ArticleAnswer by Chris for SwiftUI build a list using enums
try this:enum Whatever : String, CaseIterable, Identifiable { var id : String { UUID().uuidString } case one = "one" case two = "two"}struct ContentView: View { var body: some View { VStack { List...
View ArticleSwiftUI build a list using enums
I am trying to create SwiftUI List based on enum strings. I am faced with this error:Cannot invoke initializer for type 'List<_, _>' with an argument list of type '([HomeView.Data], @escaping...
View Article
More Pages to Explore .....