AlvaroSanzRodrigo/SuperScrollView
A ScrollView for SwiftUI that can give you the scroll offset, the scroll content size and if its currently scrolling
Requirements
.iOS(.v14),
.macOS(.v12),
.macCatalyst(.v14),Installation
dependencies: [
.package(url: "https://github.com/AlvaroSanzRodrigo/SuperScrollView")
]Usage
This SuperScrollView uses bindings to give you updated data
@State private var scrollOffset: CGPoint = .zero
@State private var scrollSize: CGSize = .zero
@State private var isScrolling: Bool = false
var body: some View {
VStack {
Text("Offset: \(scrollOffset.y)")
Text("Size Width: \(scrollSize.width)")
Text("Size Height: \(scrollSize.height)")
Text("Is scrolling: \(isScrolling.description)")
HStack {
SuperScrollView(offset: $scrollOffset, size: $scrollSize, isScrolling: $isScrolling) { scrollViewProxy in
ForEach(0..<100) { index in
Text("This is row \(index)")
}
}
}
}
.padding()
}Dependencies
This libary uses IsScrolling from fatbobman/IsScrolling
License
This library is released under the MIT license. See LICENSE for details.
Package Metadata
Repository: AlvaroSanzRodrigo/SuperScrollView
Stars: 0
Forks: 0
Open issues: 0
Default branch: main
Primary language: swift
License: MIT
README: README.md