- Add
pod 'JoRefresh'
to your Podfile. - Run
pod install
orpod update
. - Import JoRefresh
let scrollView = ...
scrollView.joRefresh.header = JoRefreshControl()
scrollView.joRefresh.footer = JoRefreshControl()
scrollView.joRefresh.tailer = JoRefreshControl()
scrollView.joRefresh.footerActiveMode = .toBottom
scrollView.joRefresh.header?.addTarget(self, action: #selector(loadData), for: .valueChanged)
scrollView.joRefresh.footer?.addTarget(self, action: #selector(moreData), for: .valueChanged)