Skip to content

A ScrollView which executes a completion handler when the user swipes down and release.

Notifications You must be signed in to change notification settings

nickpolychronakis/ScrollViewWithCompletionHandler

Repository files navigation

Buy Me A Coffee

If you like it, consider to buy me a coffee!

ScrollViewWithCompletionHandler

A ScrollView with a header View, which executes a completion handler when the user swipes down and release.

Example gif

To download the Swift Package, on Xcode go to File -> Swift Packages -> Add Package Dependency and write "https://github.com/nickpolychronakis/ScrollViewWithCompletionHandler"

Example:

ScrollViewWithCompletionHandler(header: {
    Text("Header View")
}, scrollDownCompletion: {
    print("Completion Handler, runs when the user swipes down and release.")
}) {
    Text("Here is the content of the ScrollView")
    Text("Row 1")
    Text("Row 2")
}
Parameter name Details
header: A View that will be on top of ScrollView and will animate when you scroll.
scrollDownCompletion: A completion handler that will be executed when the user swipe down the scroll view and release it.
content: Content Views of ScrollView.

ToDo:

  • Give the option to the developer to remove scroll indicators.

About

A ScrollView which executes a completion handler when the user swipes down and release.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages