SwiftUI Fundamentals

Feb 28 2023 · Swift 5.7, macOS Venture 13.1, Xcode 14.2

Part 1: SwiftUI Views

08. Repeat Views with ForEach & 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: 07. Layout with Stacks Next episode: 09. Challenge: Stacks & ForEach

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've reached locked video content where the transcript will be shown as obfuscated text.

All of this stacking is really exciting but how is it going to impact your development when it comes to building more familiar interfaces?

List
List {
  Text("Meow")
  Text("Mix")
}
List(mix.tracks, id: \.title) { track in

}
List(mix.tracks, id: \.title) { track in
  TrackRow(track: track)
}
Track: Identifiable
struct Track: Identifiable {
  let id = UUID()
🤘HStack {

}
ScrollView(.horizontal) {
  HStack(alignment: .top, spacing: 25.0) {
    ForEach(artists, id: \.self) { artist in
      FeaturedArtist(artist: artist)
    }
  }
  .padding(.horizontal)🛑
 }
ScrollView(.horizontal) {

}
FeaturedCats(artists: mix.tracks.map(\.artist))
  .padding(.vertical)
  .background(Color.gray.opacity(0.2))
var body: some View {
  VStack(spacing: 0.0) {