A SwiftUI component for synchronizing scrolling across multiple views. It allows you to create a scrollable view with fixed rows and columns, similar to a spreadsheet or table layout.
SyncedScrollView {
// Main scrollable content
} vSyncedContent: {
// Vertically synchronized content
} hSyncedContent: {
// Horizontally synchronized content
} topLeftContent: {
// Top-left corner content (default: `EmptyView`)
}For more detailed examples, see the #Preview of SyncedScrollView.swift.
An example of SyncedScrollView in action:
Using Swift Package Manager
In Xcode, open your project and navigate to Project > Package Dependencies.
Then, enter the following URL:
https://github.com/yu3san3/SyncedScrollView.git
