{"id":15038794,"url":"https://github.com/rushisangani/rsmastertableviewkit","last_synced_at":"2025-10-09T16:45:21.254Z","repository":{"id":62452208,"uuid":"125693862","full_name":"rushisangani/RSMasterTableViewKit","owner":"rushisangani","description":"All-In-One UITableView Kit with inbuilt PullToRefresh, Pagination, EmptyDataSet, Indicator, Networking and much more..","archived":false,"fork":false,"pushed_at":"2019-04-23T04:28:52.000Z","size":2232,"stargazers_count":19,"open_issues_count":1,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T00:01:20.183Z","etag":null,"topics":["codable","emptydataset","emptydataset-swift","indicator","ios","loading-indicator","networking","pagination","pull-to-refresh","searchview","swift4","uitableview"],"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/rushisangani.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":"2018-03-18T04:58:00.000Z","updated_at":"2024-12-08T03:01:03.000Z","dependencies_parsed_at":"2022-11-01T23:46:28.748Z","dependency_job_id":null,"html_url":"https://github.com/rushisangani/RSMasterTableViewKit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushisangani%2FRSMasterTableViewKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushisangani%2FRSMasterTableViewKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushisangani%2FRSMasterTableViewKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushisangani%2FRSMasterTableViewKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rushisangani","download_url":"https://codeload.github.com/rushisangani/RSMasterTableViewKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131322,"owners_count":21052819,"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":["codable","emptydataset","emptydataset-swift","indicator","ios","loading-indicator","networking","pagination","pull-to-refresh","searchview","swift4","uitableview"],"created_at":"2024-09-24T20:40:15.360Z","updated_at":"2025-10-09T16:45:16.218Z","avatar_url":"https://github.com/rushisangani.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSMasterTableViewKit\n\n### Why to use RSMasterTableViewKit?\nUITableview is the most used UIKit control for all iOS applications. Simply using UITableview does not complete the functionality of any screen.\nBased on the functionality, a developer also need to code for implementing PullToRefresh, SearchBar, Pagination, Showing loading indicator, Empty data set and many more other complex scenarios. As a developer aren't you tired doing this for all your applications by repeating code everytime?\n\n**RSMasterTableViewKit is built to help developers to quickly integrate UITableView with customization they want with minimal coding effort.**\n\n## Features\n- Easy to use datasource implementation (No need to write **cellForRowAtIndexPath**)\n- PullToRefresh\n- Pagination\n- SearchBar (Local \u0026 Web Search)\n- EmptyDataSet\n- Loading Indicator with title\n- JSON to Codable conversion\n- Networking (WebAPI request: GET, POST etc)\n- Network Reachabilty Check\n\n![Alt text](https://raw.githubusercontent.com/rushisangani/RSMasterTableViewKit/master/Images/Loader.png \"Loader\")\n![Alt text](https://raw.githubusercontent.com/rushisangani/RSMasterTableViewKit/master/Images/TableView\u0026Search.png \"TableView\")\n![Alt text](https://raw.githubusercontent.com/rushisangani/RSMasterTableViewKit/master/Images/EmptyDataView.png \"EmptyDataView\")\n![Alt text](https://raw.githubusercontent.com/rushisangani/RSMasterTableViewKit/master/Images/PullToRefresh.png \"PullToRefresh\")\n\n## Requirements\n```swift\niOS 10.0+ | Xcode 8.3+ | Swift 4.0+\n```\n\n## Installation\n\n### CocoaPods\n```ruby\npod 'RSMasterTableViewKit' or pod 'RSMasterTableViewKit', '~\u003e 1.2'\n```\n## Usage\n\n### Generic DataSource\n```swift\n// connect UITableview outlet from storyboard\n@IBOutlet weak var tableView: RSTableView!\n\n// declare a dataSource\nvar dataSource: RSTableViewDataSource\u003cComment\u003e?       //here Comment is the datamodel\n\n// setup tableview\ndataSource = RSTableViewDataSource\u003cComment\u003e(tableView: tableView, identifier: \"cell\") { (cell, comment, indexPath) in\n\n    cell.textLabel?.text = \"\\(indexPath.row+1). \\(comment.email)\"\n    cell.detailTextLabel?.text = comment.body\n}\n```\n\n### Empty DataSet\n```swift\n// set image, title, description\ntableView.setEmptyDataView(title: NSAttributedString(string: \"NO COMMENTS AVAILABLE\"), description:  NSAttributedString(string: \"Comments that you've posted will appear here.\"), image: UIImage(named: \"nodata-comments\"), background: nil)\n\n// or\n// customize background color\ntableView.setEmptyDataView(title: NSAttributedString(string: \"No Data found\"), description: nil, image: nil, background: RSEmptyDataBackground.color(color: UIColor.white))\n\n// or\n// background view or image\ntableView.setEmptyDataView(title: nil, description: NSAttributedString(string: \"No Results\"), image: nil, background: RSEmptyDataBackground.view(view: imageView))\n```\n\n### PullToRefresh\n```swift\ntableView.addPullToRefresh { [weak self] in\n    \n    // your code to handle pull to refresh action\n    DispatchQueue.global().asyncAfter(deadline: .now()+2, execute: {\n        \n        // refresh data\n    })\n}\n\n// customize title and color\ntableView.setPullToRefresh(tintColor: UIColor.darkGray, attributedText: NSAttributedString(string: \"Fetching data\"))\n```\n\n### Pagination\n```swift\ntableView.addPagination { (page) in\n\n    // url for next page\n    let url = self?.getURLForPage(page)\n\n    // fetch \u0026 append data\n    self?.fetchDataFromServer(url: url!, completion: { (list) in\n        self?.dataSource?.appendData(data: list)\n    })\n}\n\n// set pagination parameters (Default: Start = 0 \u0026 Size = 20)\n\nlet paginationParams = PaginationParameters(page: 1, size: 50)\ntableView.addPagination(parameters: paginationParams) { [weak self] (page) in\n}\n```\n\n### SearchBar\n```swift\ntableView.addSearchBar()\n\n// or\ntableView.addSearchBar(placeHolder: \"Search..\", noResultMessage: NSAttributedString(string: \"No result matching your search criteria\"))\n\n// search handler\ndataSource?.searchResultHandler = { [weak self] (searchString, dataArray) in\n\n    // filter\n    let result = dataArray.filter({ $0.email.starts(with: searchString) })\n    self?.dataSource?.setSearchResultData(result, replace: false)\n    \n    // Note:\n    // replace: true - will replace your main dataSource (use in case you want to search data from web)\n    // replace: false - will maintain your main dataSource (use in case you want to search within existing data)\n}\n```\n### Loading Indicator\n```swift\ntableView.showIndicator(title: NSAttributedString(string: \"LOADING\"), tintColor: UIColor.darkGray)\n```\n\n### Networking\n```swift\n// prepare request -\u003e This returns array of comments\nlet request = DataModelRequest\u003c[Comment]\u003e(url: \"URL Here\")\n\n// execute request\nrequest.execute(success: { [weak self] (comments) in\n    self?.dataSource?.appendData(data: comments)\n\n}) { [weak self] (error) in\n    self?.tableView.hideAllAnimations()\n}\n\n// or\n// JSON Request\nlet jsonrequest = JSONRequest(url: \"\", method: .POST, headers: nil, parameters: nil, responeKeyPath: \"data\")\n\n// Note: Specify keypath here, if you want only key specific json data\n// \"data\" or \"data.contents\" etc.\n```\n\n### DataSource Operations\n```swift\n// append rows to datasource\nself.dataSource?.appendData(data: list)\n\n// append at top\nself.dataSource?.prependData(data: list)\n\n// set or replace existing data with new\nself.dataSource?.setData(data: list)\n\n// clear\nself.dataSource?.clearData()\n```\n\n### Network Reachabilty\n```swift\nif ReachabilityManager.isReachable {\n    // your code\n}\n\n// handler reachability changes\nNotificationCenter.default.addObserver(self, selector: #selector(handleReachabiltyChanges(notification:)), name: NSNotification.Name.init(reachabilityChangedNotification), object: nil)\n\n@objc func handleReachabiltyChanges(notification: Notification) {\n    let isReachable = notification.userInfo?[reachabilityStatus] as? Bool ?? false\n\n    if isReachable {\n        // inform user\n    }\n}\n```\n\n### Example\nSee [Example](https://github.com/rushisangani/RSMasterTableViewKit/tree/master/RSMasterTableViewKitExample) for more details.\n\n## License\n\nRSMasterTableViewKit is released under the MIT license. [See LICENSE](https://github.com/rushisangani/RSMasterTableViewKit/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushisangani%2Frsmastertableviewkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frushisangani%2Frsmastertableviewkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushisangani%2Frsmastertableviewkit/lists"}