Recall & Review
beginner
What is a List in SwiftUI?
A
List in SwiftUI is a view that displays rows of data in a single column, similar to a table. It is used to show collections of items in a scrollable list.Click to reveal answer
beginner
How do you create a simple list of static text items in SwiftUI?
You use
List with static views inside, like:<br>List { Text("Item 1") Text("Item 2") }Click to reveal answer
intermediate
What is the purpose of the
ForEach inside a List?ForEach lets you create a list from a dynamic collection of data by repeating views for each item.Click to reveal answer
intermediate
Why do items in a List need to be Identifiable?
SwiftUI needs to know how to uniquely identify each item to manage updates and animations efficiently. Making items
Identifiable provides a unique ID for each.Click to reveal answer
beginner
How can you add a navigation title to a List in SwiftUI?
Wrap the List in a
NavigationView and use .navigationTitle("Title") modifier on the List or its container.Click to reveal answer
Which SwiftUI view is used to display a scrollable list of rows?
✗ Incorrect
List is the view designed for scrollable lists of rows.What does
ForEach do inside a List?✗ Incorrect
ForEach repeats views for each item in a data collection.Why must items in a List be Identifiable?
✗ Incorrect
Identifiable items let SwiftUI track and update each row efficiently.
How do you add a title to a List screen?
✗ Incorrect
NavigationView with .navigationTitle() sets the screen title.
Which of these is NOT a correct way to create a List?
✗ Incorrect
Wrapping rows inside VStack inside List creates only one row, not multiple.
Explain how to create a dynamic list of items in SwiftUI and why Identifiable is important.
Think about how SwiftUI knows which row is which when data changes.
You got /5 concepts.
Describe how to add a navigation title to a list screen in SwiftUI.
Remember the container that enables navigation features.
You got /4 concepts.