3

I have a SwiftUI expanding list built as shown in this article.

Here is my implementation:

struct ContentView: View {
    
    var movies: [Movie]

    var body: some View {
        List(movies, children: \.movies) { movie in
                Text(movie.title)
        }
    }
}

struct Movie: Identifiable {
    let id: String
    let title: String
    var movies: [Movie]?
}

Here is the animation on iOS 16.1:

List on iOS 16.1

And Since iOS 16.4 the animation is broken:

List on iOS 16.4

Is it a bug on OS level or should I use another technique ?

nelson PARRILLA
  • 498
  • 1
  • 6
  • 17

1 Answers1

1

I have to close List second-level animation for iOS 16.4 with this bug.

List{}.transaction { transaction in
    transaction.animation = nil
}
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
John
  • 11
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Jeremy Caney Jun 22 '23 at 00:48