{"id":15029391,"url":"https://github.com/takuoka/pulltobounce","last_synced_at":"2025-05-16T01:05:05.792Z","repository":{"id":36330494,"uuid":"40635191","full_name":"takuoka/PullToBounce","owner":"takuoka","description":"Animated \"Pull To Refresh\" Library for UIScrollView.  Inspired by https://dribbble.com/shots/1797373-Pull-Down-To-Refresh","archived":false,"fork":false,"pushed_at":"2019-11-05T17:44:15.000Z","size":7225,"stargazers_count":1865,"open_issues_count":18,"forks_count":166,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-16T01:05:04.331Z","etag":null,"topics":["animation","ios","library"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takuoka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-13T02:39:22.000Z","updated_at":"2025-04-11T14:48:57.000Z","dependencies_parsed_at":"2022-08-08T14:15:47.330Z","dependency_job_id":null,"html_url":"https://github.com/takuoka/PullToBounce","commit_stats":null,"previous_names":["entotsu/pulltobounce"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuoka%2FPullToBounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuoka%2FPullToBounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuoka%2FPullToBounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuoka%2FPullToBounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takuoka","download_url":"https://codeload.github.com/takuoka/PullToBounce/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","ios","library"],"created_at":"2024-09-24T20:10:30.171Z","updated_at":"2025-05-16T01:05:05.756Z","avatar_url":"https://github.com/takuoka.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PullToBounce\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\n)](http://mit-license.org)\n[![CocoaPods](https://img.shields.io/cocoapods/v/PullToBounce.svg)]()\n\n\nAnimated \"Pull To Refresh\" Library for UIScrollView.\n\nYou can add animated \"pull to refresh\" action to your UIScrollView, UITableView and UICollectionView.\n\nInspired by https://dribbble.com/shots/1797373-Pull-Down-To-Refresh\n\n[Objective-C version is here.](https://github.com/luckymore0520/LMPullToBounce)\n\n[Xamarin.iOS version is here.](https://github.com/mattleibow/PullToBounce)\n\n# ScreenShot\n![Demo GIF Animation](https://raw.githubusercontent.com/entotsu/PullToBounce/master/demo.gif \"Demo GIF Animation\")\n\nYou can play demo at [appetize.io](https://appetize.io/app/hbj0vawpk8uw9z00838vz5he4g).\n\n# Installation\n\nYou can install this to your project via CocoaPods.\n\n```\npod 'PullToBounce'\n```\n\n\n# Usage\n\n## Please Wrap your scroll view\n\n``` swift\n// Please wrap your scroll view\ntableView.frame = yourFrame\nlet tableViewWrapper = PullToBounceWrapper(scrollView: tableView)\n\n// Please add wrapper view to your view instead of your scroll view.\nbodyView.addSubview(tableViewWrapper)\n```\nThe frame of wrapper will be same as your scrollView.\n\nAnd the color will be same as your scrollView's background color.\n\n\n## Event Handler\n\n``` swift\ntableViewWrapper.didPullToRefresh = {\n    didFinishYourLoading() {\n        tableViewWrapper.stopLoadingAnimation()\n    }\n}\n```\n\n\n\n# Custom Animation\n\n#### Default arguments of \"init\" of PullToBounceWrapper\n\n\n``` swift\ninit(\n  scrollView: UIScrollView, // this is the only required argument\n  bounceDuration: CFTimeInterval = 0.8,\n  ballSize:CGFloat = 36,\n  ballMoveTimingFunc: CAMediaTimingFunction = CAMediaTimingFunction(controlPoints:0.49,0.13,0.29,1.61),\n  moveUpDuration: CFTimeInterval = 0.25,\n  pullDistance: CGFloat = 96,\n  bendDistance: CGFloat = 40,\n  didPullToRefresh: (()-\u003e())? = nil\n)\n```\nYou can use these arguments to customize animation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuoka%2Fpulltobounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakuoka%2Fpulltobounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuoka%2Fpulltobounce/lists"}