ADChromePullToRefresh 1.0.0

ADChromePullToRefresh 1.0.0

测试已测试
语言语言 SwiftSwift
许可 MIT
发布上次发布2016年12月
SwiftSwift 版本3.0
SPM支持 SPM

Anton Domashnev 维护。



  • Anton Domashnev

ADChromePullToRefresh

满足您需求的又一个自定义下拉刷新。

灵感来自 Google Chrome iOS 应用

易于使用

您可以使用以下初始化器简单地设置您自己的 Chrome 风格的下拉刷新

/*
 * To initialize ADChromePullToRefresh use this designated initializer
 * @param view - view to overlay by pull to refresh
 * @param scrollView - for which scrollView we add pull to refresh
 * @param scrollViewOriginalOffsetY - initial offset y of the given scrollView
 * @param delegate - object conformed to ADChromePullToRefreshDelegate protocol
 */
init(view: UIView, forScrollView scrollView: UIScrollView, scrollViewOriginalOffsetY: CGFloat, delegate: ADChromePullToRefreshDelegate)

为了为下拉刷新动作提供自定义处理程序,您需要在您的类中实现这个代理方法

/*
 * Use this function to provide an action for the given action view type
 */
func chromePullToRefresh(_ pullToRefresh: ADChromePullToRefresh, actionForViewWithType: ADChromePullToRefreshActionViewType) -> ADChromePullToRefreshAction?

您可以根据自己的需求自定义下拉刷新动作视图🚀

/*
 * Use this function to create view with icon for the given pullToRefresh. To customize view use subclass of   
 * ADChromePullToRefreshActionView
 * @see ADChromePullToRefreshActionView.swift
 * @see UITableViewDelegate - similar method to get header and footer view
 */
func chromePullToRefresh(_ pullToRefresh: ADChromePullToRefresh, viewWithType: ADChromePullToRefreshActionViewType) -> ADChromePullToRefreshActionView

易于安装