EasyRefresher 0.8.1

EasyRefresher 0.8.1

Maintained by Pircate.



  • By
  • Pircate

EasyRefresher

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0
  • Swift 4.2

Installation

EasyRefresher is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'EasyRefresher'

Demo

Usage

  • Add Refresher
tableView.refresh.header.addRefreshClosure {
    self.reqeust {
        self.tableView.refresh.header.endRefreshing()
    }
}

tableView.refresh.footer = AutoRefreshFooter {
    self.reqeust {
        self.tableView.refresh.footer.endRefreshing()
    }
}
  • Manual Trigger
tableView.refresh.header.beginRefreshing()
  • State Title
tableView.refresh.header.setTitle("loading...", for: .refreshing)
  • UIActivityIndicatorView Style
tableView.refresh.header.activityIndicatorStyle = .white
  • Custom State View
extension CustomStateView: RefreshStateful {
    
    public func refresher(_ refresher: Refresher, didChangeState state: RefreshState) {
        
    }
}

tableView.refresh.footer = AppearanceRefreshFooter(stateView: CustomStateView()) {
    self.reqeust {
        self.tableView.refresh.footer.endRefreshing()
    }
}

Author

Pircate, [email protected]

License

EasyRefresher is available under the MIT license. See the LICENSE file for more info.