List
#list
Overview
Subjects
Form vs List
Form is for User Input
List is for Presentation of data
Edge to Edge Color
.listStyle(.plain)List with row number
Let list =["Car", "Bike", "Plane", "Boat"]
for(index, element) inlist.enumerated() {
print(index, ":", element)}
// print: 0 : Car1 : Bike2 : Plane3 : BoatList with Sections

Sorted List
The result is the same on both methods. The benefit is, in case of using this list everywhere with same sorting method, we can change the sorting method in the struct and it changes everywhere we use the list.

Swipe Actions
Other sources
Adding options with Swipe Actions
Sorting the List
Define the alternatives
Convert enum type to variable and Publish it
Sources
Videos
Articles / Documents
Last updated
Was this helpful?