Skip to content

Available in iOS14+, add ‘refreshable’ for view (using in a million-user APP)

License

Notifications You must be signed in to change notification settings

Rex-xingjl/SwiftUI-PPRefreshable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

SwiftUI-PPRefreshable

Available in iOS14+, add refreshable for view (using in a million-user APP)

可在iOS14+版本使用的给视图添加刷新样式(已在百万用户的项目中使用)

How to use

block style

PPList(isRefreshing: $viewModel.model.isRefershing) {
    content
} refreshAction: { completion in
    refreshFunction(completion)
}

async style

PPList(isRefreshing: $viewModel.model.isRefershing) {
   content
} asyncRefreshAction: {
    await asyncRefreshFuction()
}

Any other views want to refreshable?

LazyVGrid(columns: itemLayouts, spacing: 0) {
    content
}.pp_refreshable($viewModel.model.isRefershing) { completion in
    refreshFunction(completion)
}

Sight

You can modify the animation and other features in the projects

screenRecord.mov

About

Available in iOS14+, add ‘refreshable’ for view (using in a million-user APP)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published