Latest 0.1.0
Homepage https://github.com/Lves/LLRefresh
License MIT
Platforms ios 8.0
Authors

LLRefresh

  • 用Swift实现下拉刷新,上滑加载更多(LLRefresh is a pull&push to refresh library written in Swift)

Features

  • 下拉刷新(pull to refresh )
  • 上滑加载更多(push to load more)
  • 动画(Animation)
  • 自定义(Custom)

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3.0+

Installation

1. CocoaPods

pod 'LXLRefresh'

2. SourceCode

Usage

引入Module

import LLRefresh

使用时可以使用target或者block

  • Block
    //1.0 Init
    self.tableView.ll_header =  LLRefreshStateHeader {[weak self] _ in
    sleep(2)
    //3.0 Stop Refreshing
    self?.tableView.ll_header?.endRefreshing()
    }
    //2.0 Begin refreshing
    self.tableView.ll_header?.beginRefreshing()
  • Target
    tableView.ll_header = LLRefreshStateHeader(target: self, action: #selector(loadNewData))
    tableView.ll_header?.beginRefreshing()
    func loadNewData()  {
    //update data
    sleep(2)
    //end refreshing
    tableView.ll_header?.endRefreshing()
    tableView.reloadData()
    }

具体使用和自定义可以下载demo查看

Demo

  1. Noraml refresh header

normal

  1. Refresh header with BgImage

bgheader

  1. Refresh header with Gif

bgheader

  1. Refresh footer

footer

Latest podspec

{
    "name": "LXLRefresh",
    "module_name": "LLRefresh",
    "version": "0.1.0",
    "summary": "LLRefresh is a pull&push to refresh library written in Swift",
    "homepage": "https://github.com/Lves/LLRefresh",
    "license": "MIT",
    "authors": {
        "lixingle": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Lves/LLRefresh.git",
        "tag": "0.1.0"
    },
    "source_files": [
        "LLRefresh/**/*",
        "LLRefresh/**/**/*.swift",
        "LLRefresh/**/*.swift"
    ],
    "resources": "LLRefresh/LLRefresh.bundle",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This