Latest 0.1
Homepage https://github.com/10clouds/ParticlePullToRefresh-iOS
License MIT
Platforms ios 11.0
Frameworks Foundation
Authors

Example

Example

To run the example project clone the repo and run Example target

Requirements

  • Xcode 9
  • Swift 4.1
  • iOS 11

Installation

ParticlePullToRefresh doesn’t contain any external dependencies

CocoaPods

pod 'ParticlePullToRefresh'

Usage

Add pull-to-refresh to the scroll view subclass and provide an action closure. Call endRefreshing() when you are done to finish the animation

tableView.addParticlePullToRefresh { [weak self] in
  DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
    self?.tableView.particlePullToRefresh?.endRefreshing()
  }
}

Remove pull-to-refresh on deinit

deinit {
  tableView.removeParticlePullToRefresh()
}

Customization

You can optionally pass the color when you add pull-to-refresh to the scroll view subclass

tableView.addParticlePullToRefresh(color: .yellow) { [weak self] in
  DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
    self?.tableView.particlePullToRefresh?.endRefreshing()
  }
}

Author

Alex Demchenko, [email protected]

License

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

Latest podspec

{
    "name": "ParticlePullToRefresh",
    "version": "0.1",
    "summary": "Custom pull-to-refresh with animated particle system",
    "homepage": "https://github.com/10clouds/ParticlePullToRefresh-iOS",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Alex Demchenko": "[email protected]"
    },
    "social_media_url": "https://twitter.com/10clouds",
    "platforms": {
        "ios": "11.0"
    },
    "swift_version": "4.1",
    "source": {
        "git": "https://github.com/10clouds/ParticlePullToRefresh-iOS.git",
        "tag": "0.1"
    },
    "source_files": "Sources/**/*",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This