Skip to content

Releases: c-villain/Refreshable

0.2.0

20 Dec 18:01
2e62fe4
Compare
Choose a tag to compare

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")
    }
}

0.1.0

13 Dec 20:26
40c4498
Compare
Choose a tag to compare
Update README.md