{"id":15037503,"url":"https://github.com/mu29/pagingtableview","last_synced_at":"2025-07-27T21:37:52.301Z","repository":{"id":41203513,"uuid":"88393191","full_name":"mu29/PagingTableView","owner":"mu29","description":"The simplest way to make your table view paginable","archived":false,"fork":false,"pushed_at":"2020-05-13T22:57:30.000Z","size":2160,"stargazers_count":55,"open_issues_count":3,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-15T00:01:23.201Z","etag":null,"topics":["infinite-scroll","ios","pagination","swift","swift3","tableview"],"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/mu29.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":"2017-04-16T05:29:45.000Z","updated_at":"2024-01-09T01:02:49.000Z","dependencies_parsed_at":"2022-09-13T10:00:41.853Z","dependency_job_id":null,"html_url":"https://github.com/mu29/PagingTableView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu29%2FPagingTableView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu29%2FPagingTableView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu29%2FPagingTableView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu29%2FPagingTableView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mu29","download_url":"https://codeload.github.com/mu29/PagingTableView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248127163,"owners_count":21052197,"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":["infinite-scroll","ios","pagination","swift","swift3","tableview"],"created_at":"2024-09-24T20:34:50.050Z","updated_at":"2025-04-09T23:24:19.291Z","avatar_url":"https://github.com/mu29.png","language":"Swift","readme":"# PagingTableView\n\n[![Version](https://img.shields.io/cocoapods/v/PagingTableView.svg?style=flat)](http://cocoapods.org/pods/PagingTableView)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/mu29/PagingTableView/blob/master/LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/PagingTableView.svg?style=flat)](http://cocoapods.org/pods/PagingTableView)\n[![Swift 3.1](https://img.shields.io/badge/Swift-3.1-orange.svg?style=flat)](https://developer.apple.com/swift/)\n\nThe simplest way to add paginate (a.k.a infinite scroll) function to your table view.  \nAll you have to do is just set your table view class in the storyboard to `PagingTableView`, and implement the `PagingTableViewDelegate#paginate`\n\n## Installation\n\n`PagingTableView` is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"PagingTableView\"\n```\n\n## Example\n\n\u003cimg src=\"etc/example.gif\" width=\"400\" /\u003e\n\nSee full example [here](https://github.com/mu29/PagingTableView/blob/master/Example).  \nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Usage\n\nFirst set your table view class in the storyboard to `PagingTableView`\n\n\u003cimg src=\"etc/usage1.png\" width=\"500\" /\u003e\n\nThen implement `paginate` function. If `isLoading` is set to true, an indicator is displayed at the bottom of the table view. Otherwise, the indicator disappears and `UITableView.reloadData` is called.\n\n```swift\nclass MainViewController: UIViewController {\n\n  override func viewDidLoad() {\n    ...\n    contentTable.pagingDelegate = self\n  }\n\n  ...\n\n}\n\nextension MainViewController: PagingTableViewDelegate {\n\n  func paginate(_ tableView: PagingTableView, to page: Int) {\n    contentTable.isLoading = true\n    contentDataSource.loadData(at: page) { contents in\n      self.contents.append(contentsOf: contents)\n      self.contentTable.isLoading = false\n    }\n  }\n\n}\n```\n\nSee [example](https://github.com/mu29/PagingTableView/blob/master/Example) for more information.\n\n## APIs\n\n| Name | Type | Description |\n|---|---|---|\n| `pagingDelegate` | `PagingTableViewDelegate` | Delegate pagination processing |\n| `currentPage` | `Int` | Returns the current page |\n| `isLoading` | `Bool` | Shows and hides the loading indicator. Reload table view data after loading |\n| `reset()` | `Void` | Return page to 0 and call `paginate` function |\n\n## Author\n\nInJung Chung / [@mu29](http://mu29.github.io/)\n\n## License\n\n`PagingTableView` is available under the MIT license. See the [LICENSE](https://github.com/mu29/PagingTableView/blob/master/LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu29%2Fpagingtableview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmu29%2Fpagingtableview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu29%2Fpagingtableview/lists"}