There seems to be a bug; when scrolling very quickly down a List, and then scrolling up at normal speed, scrolling becomes very janky and jumpy, often skipping one or two rows. This only happens on macOS.
I'm kind of surprised I've seen no one else mention this bug, as I can recreate it in a very simple Xcode Project. I'm wondering if anyone knows of a workaround?
Steps to reproduce:
Build and launch the code below
Very quickly scroll all the way down using the scrollbar
Scroll up at a normal speed, after a few rows it will get janky
Code:
struct MinimalAlbum: Identifiable {
let id: Int
let title: String
}
struct ContentView: View {
private let staticAlbums: [MinimalAlbum] = (0..<1000).map { i in
MinimalAlbum(id: i, title: "Album Title \(i)")
}
var body: some View {
List {
ForEach(staticAlbums) { album in
Text("Album ID: \(album.id) - \(album.title)")
.frame(height: 80) // Fixed height
}
}
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The toolbar in the the Mail app uses seems to force a
.soft scrollEdgeEffectStyle, however I can't seem to reproduce this. Even when putting .scrollEdgeEffectStyle(.soft, for: .top) all over my code, a NavigationSplitView seems to force a "classic" toolbar.
Example, top is the mail app, bottom is my swiftUI app: