Your Second iOS & SwiftUI App

Nov 4 2021 · Swift 5.5, iOS 15, Xcode 13

Part 1: List View Fundamentals

06. Lists

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 05. Challenge: Book Row Next episode: 07. Navigation

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Finally! In this episode, you’ve built up enough of your app for it to make sense to incorporate a List! We’ve talked about doing that enough, already! So, let’s go!

  var body: some View {
    List(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { item in
      BookRow(book: .init())
    }
  }
      BookRow(book: .init(title: "\(item)"))
List(Library().sortedBooks) { item in
List(Library().sortedBooks, id: ) { item in
List(Library().sortedBooks, id: \.title) { item in
{ book in
BookRow(book: book)
      }
      .lineLimit(1)
    }
        .lineLimit(1)
      }
      .padding(.vertical, 8)
    }