Skip to content

A SwiftUI ScrollView supporting offset & deceleration callbacks

License

Notifications You must be signed in to change notification settings

EvanCooper9/ECScrollView

Repository files navigation

ECScrollView

A SwiftUI ScrollView supporting offset & deceleration callbacks

Installation

SPM

.package(url: "https://github.com/EvanCooper9/ECScrollView", from: "1.0.0")

Usage

Initialize like a regular ScrollView, and optionally handle offset changes & deceleration

import ECScrollView

ECScrollView() {
    // content ...
}
.onContentOffsetChanged { offset, size, proxy in
    // handle content offset
}
.didEndDecelerating { offset, proxy in
    // handle deceleration ending
}

About

A SwiftUI ScrollView supporting offset & deceleration callbacks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages