Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.71 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.71 KB

RefreshControl

Warning

The noppefoxwolf/RefreshControl is using some black magic. I recommend reviewing the implementation code. You can use this library with own risk.

Feature

UIRefreshControl compatible

  • Arrow style content view (ContentHostingRefreshControl)
  • Offscreen begin refresh (WaitHostingRefreshControl)
  • UIRefreshControl extensions (UIRefreshControl+)

Subclass extends

  • Customize content view (ContentHostingRefreshControl)
  • Overtime message (OvertimeRefreshControl)
  • Timeout handler (TimeoutRefreshControl)
  • Add delegate (DelegatableRefreshControl)
  • Private method access (InternalRefreshControl)

Additional extends

  • disabled control (RefreshControlController)

Usage

The noppefoxwolf/RefreshControl is subclass of UIRefreshControl. You can use this library same of UIRefreshControl.

import RefreshControl
...
refreshControl = RefreshControl()
refreshControl!.addAction(UIAction { _ in
  ...
}, for: .primaryActionTriggered)

If you want to use disabled refreshControl. You can use RefreshControlController.

tableView.refreshControlController = RefreshControlController(
    refreshControl: refreshControl
)
tableView.refreshControlController.isEnabled = false // Show disabled view

Apps Using

If you use a RefreshControl, add your app via Pull Request.

LICENSE

RefreshControl is released under an MIT license. See the LICENSE file for more information