Releases: c-villain/Refreshable
Releases · c-villain/Refreshable
0.2.0
Add ScrollDistance to control responsiveness for refreshable during scrolling
import Refreshable
struct Constants {
public static let isPad: Bool = UIDevice.current.userInterfaceIdiom == .pad
}
struct YourView: View {
var body: some View {
ScrollView {
RefreshControl(Constants.isPad ? .long : .short, // <= HERE
coordinateSpace: .named("List")) {
// do your work on refresh here
}
LazyVStack {
...
}
}
.coordinateSpace(name: "List")
}
}