iOS Swift - Lists and Data Display
Which of the following is the correct syntax to create a List with ForEach over an array
items of strings in SwiftUI?items of strings in SwiftUI?id: \.self to identify each item uniquely.id: \.self. List { ForEach(items) { item in Text(item) } } misses the id parameter, causing errors. Options C and D use invalid keys for strings.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions