Skip to content

magickworx/BetterScrollViewSwiftUI

Repository files navigation

BetterScrollViewSwiftUI

This package provides you a custom ScrollView and you can get the following featrues.

  • Content offset
  • Scroll direction
  • End of scroll ((you can get the last content offset and scroll direction together)
  • ScrollViewProxy

You can add this package on Xcode. See documentation.

How to Use

You can just import BetterScrollViewSwiftUI to use the package.

  @State private var contentOffset: CGPoint = .zero
  @State private var scrollDirection: ScrollDirection = .unknown

  BetterScrollView(contentOffset: $contentOffset, scrollDirection: $scrollDirection) { proxy in
    // your code here
  }
  .onScrollEnded {
    (offset, direction) in
    // your code here
  }

License

This package is licensed under BSD License

About

Custom ScrollView for SwiftUI with Useful Features

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages