Post

Replies

Boosts

Views

Activity

Reply to Scrolling up in List after having quickly scrolled down becomes jumpy
Little update: setting .environment(\.defaultMinListRowHeight, 80) seems to fix the issue for lists with static heights for each row, however, this still makes List pretty much unusable for lists with variable height. Example: struct MinimalAlbum: Identifiable { let id: Int let title: String let height: CGFloat } struct ContentView: View { private let staticAlbums: [MinimalAlbum] = (0..<1000).map { i in MinimalAlbum( id: i, title: "Album Title \(i)", height: CGFloat.random(in: 70..<90) ) } var body: some View { List { ForEach(staticAlbums) { album in HStack { Rectangle() .frame(width: 80, height: album.height) .foregroundColor(.blue) Text("Album ID: \(album.id) - \(album.title)") } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25