{"id":2846,"url":"https://github.com/robertherdzik/RHPreviewCell","last_synced_at":"2025-08-03T12:31:27.587Z","repository":{"id":62451980,"uuid":"69181877","full_name":"robertherdzik/RHPreviewCell","owner":"robertherdzik","description":"I envied so much Spotify iOS app this great playlist preview cell 😍, I decided to create my own one 🌶. Now you can give your users ability to quick check \"what content is hidden under your UITableViewCell\". Great think is that this Library not requires 3D Touch support from user device💥.","archived":false,"fork":false,"pushed_at":"2018-05-24T06:28:19.000Z","size":22375,"stargazers_count":386,"open_issues_count":1,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-27T19:02:46.337Z","etag":null,"topics":["demo","spotify-ios","uitableviewcell"],"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/robertherdzik.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":"2016-09-25T18:15:57.000Z","updated_at":"2025-01-26T19:24:06.000Z","dependencies_parsed_at":"2022-11-01T23:45:32.753Z","dependency_job_id":null,"html_url":"https://github.com/robertherdzik/RHPreviewCell","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/robertherdzik/RHPreviewCell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherdzik%2FRHPreviewCell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherdzik%2FRHPreviewCell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherdzik%2FRHPreviewCell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherdzik%2FRHPreviewCell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertherdzik","download_url":"https://codeload.github.com/robertherdzik/RHPreviewCell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertherdzik%2FRHPreviewCell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268393236,"owners_count":24243302,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["demo","spotify-ios","uitableviewcell"],"created_at":"2024-01-05T20:16:24.374Z","updated_at":"2025-08-03T12:31:24.640Z","avatar_url":"https://github.com/robertherdzik.png","language":"Swift","funding_links":[],"categories":["UI","Content"],"sub_categories":["Table View / Collection View","Layout","Other free courses","Table View"],"readme":"![](./ReadmeAssets/RHPreviewCellHeadLogo.gif)\n\n[![Version](https://img.shields.io/cocoapods/v/RHPreviewCell.svg?style=flat)](http://cocoadocs.org/docsets/RHPreviewCell)\n[![License](https://img.shields.io/cocoapods/l/BadgeSwift.svg?style=flat)](/LICENSE)\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)\n[![Twitter](https://img.shields.io/twitter/follow/Roherdzik.svg?style=social\u0026label=Follow)](https://twitter.com/Roherdzik)\n\n# RHPreviewCell 🌶\nI envied so much Spotify iOS app this great playlist preview cell 😍, I decided to create my own one 🌶. Now you can give your users ability to quick check \"what content is hidden under your UITableViewCell\". Great think is that this Library not requires 3D Touch support from user device💥.\n\n## Play with it 😎\n\u003cp align=\"center\"\u003e\n\u003cimg src =\"./ReadmeAssets/demo.gif\" width=\"360\"/\u003e\n\u003c/p\u003e\n\n## Installation\nYou can install RHPreviewCell library using Cocoapods:\n```\npod 'RHPreviewCell'\n```\nor you can simply copy ```RHPreviewCellSource``` folder to your project.\n\n## Usage\nTo fully integrate RHPreviewCell with your Table View you just need to use RHPreviewCell like normal UITableViewCell in terms of your TableView data source 'cellForRowAtIndexPath' method.\n\n```swift\nfunc tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -\u003e UITableViewCell {\n    // Fetching already registered RHPreviewTableViewCell\n    let cell = tableView.dequeueReusableCellWithIdentifier(reuseCellIdentifier) as! RHPreviewTableViewCell\n\n    // Delegate using which, tiles will talk to your class\n    cell.delegate = self\n    // Data source for feed small tiles 🚼\n    cell.dataSource = self\n\n    return cell\n}\n```\n💡 Important thing is that your View Controller needs to comform to ``` RHPreviewCellDataSource```  and ``` RHPreviewCellDelegate```  protocols. In that way you will be able to provide all neccesary data for ``` RHPreviewTalveViewCell```  tiles.\n\n### RHPreviewCellDataSource\n```swift\nfunc previewCellNumberOfTiles(cell: RHPreviewTableViewCell) -\u003e Int\nfunc previewCell(cell: RHPreviewTableViewCell, tileForIndex: Int) -\u003e RHPreviewTileView\n```\n\n### RHPreviewCellDelegate\n```swift\nfunc previewCell(cell: RHPreviewTableViewCell, didSelectTileAtIndex indexValue: RHTappedTileIndexValue)\n```\nAnd thats it! 💥  You have already integrete Library with your Table View 🎉\n\n## Implementation hint from me\n### [Q] How may look like tiles communiacation with my class❓🤔\nAs I said using ``` RHPreviewCellDelegate``` . I will show you how to handle it for particular cell:\n\n```swift\nfunc previewCell(cell: RHPreviewTableViewCell, didSelectTileAtIndex indexValue: RHTappedTileIndexValue) {\n    let cellIndex = tableView.indexPathForCell(cell)!.row\n\n    switch indexValue {\n    case .TileTapped(let index):\n        print(\"😲 \\(index) has been selected\")\n    case .FingerReleased:\n        print(\"🖖🏽 Finger has been released (non of tiles has been tapped)\")\n    }\n}\n```\n\n... as you can see delegate method as a argument takes ``` RHTappedTileIndexValue``` , yup... it is swift enum using which you will gather information about tapped tile (```.TileTapped(let index)``` ) or even whether user released his finger out of tiles area (```.FingerReleased``` ).\n\n## Swift support\n| Library ver| Swift ver|\n| ------------- |:-------------:|\n| 1.0.1   | 2.2 |\n| 1.0.2   | 2.3 |\n| 1.0.3   | 3.0 |\n| 1.1.0   | 4.0 |\n\n\n\n## Check the Demo project\n\nPlease check out the demo project, you can see there how Library has been implemented in details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertherdzik%2FRHPreviewCell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertherdzik%2FRHPreviewCell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertherdzik%2FRHPreviewCell/lists"}