Post

Replies

Boosts

Views

Activity

iOS 16.1 Crashes when scroll (LazyVStack and LazyVGrid)
Code to reproduce: struct CrashView: View {   var body: some View {           ScrollView {       LazyVStack {         ForEach(0...100, id: \.self) { i in           LazyVGrid(columns: Array(repeating: .init(.fixed(100)), count: 3), content: {             ForEach(0...20, id: \.self) { i in               Color.red.opacity(Double(i + 1) / 20).frame(height: 300)             }           })         }       }     }         } } Important: it crashes on iOS 16.1 !!! We have 21 grid item (3 item and 7 full lines) for every LazyVStack item. Scroll it until 5 LazyVStack item. Start scrolling to top. It blinks and show incorrect count: you see that it shows 1 item in line, but it is impossible. If you continue scrolling app crashes.
22
6
5.8k
Oct ’22