Skip to content

A customized refresh control based on UIRefreshControl.

License

Notifications You must be signed in to change notification settings

noppefoxwolf/RefreshControl

Repository files navigation

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

About

A customized refresh control based on UIRefreshControl.

Topics

Resources

License

Stars

Watchers

Forks

Languages