RHPreviewCell
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๐ฅ.
Install / Use
/learn @robertherdzik/RHPreviewCellREADME

RHPreviewCell ๐ถ
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๐ฅ.
Play with it ๐
<p align="center"> <img src ="./ReadmeAssets/demo.gif" width="360"/> </p>Installation
You can install RHPreviewCell library using Cocoapods:
pod 'RHPreviewCell'
or you can simply copy RHPreviewCellSource folder to your project.
Usage
To 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.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
// Fetching already registered RHPreviewTableViewCell
let cell = tableView.dequeueReusableCellWithIdentifier(reuseCellIdentifier) as! RHPreviewTableViewCell
// Delegate using which, tiles will talk to your class
cell.delegate = self
// Data source for feed small tiles ๐ผ
cell.dataSource = self
return cell
}
๐ก 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.
RHPreviewCellDataSource
func previewCellNumberOfTiles(cell: RHPreviewTableViewCell) -> Int
func previewCell(cell: RHPreviewTableViewCell, tileForIndex: Int) -> RHPreviewTileView
RHPreviewCellDelegate
func previewCell(cell: RHPreviewTableViewCell, didSelectTileAtIndex indexValue: RHTappedTileIndexValue)
And thats it! ๐ฅ You have already integrete Library with your Table View ๐
Implementation hint from me
[Q] How may look like tiles communiacation with my classโ๐ค
As I said using RHPreviewCellDelegate . I will show you how to handle it for particular cell:
func previewCell(cell: RHPreviewTableViewCell, didSelectTileAtIndex indexValue: RHTappedTileIndexValue) {
let cellIndex = tableView.indexPathForCell(cell)!.row
switch indexValue {
case .TileTapped(let index):
print("๐ฒ \(index) has been selected")
case .FingerReleased:
print("๐๐ฝ Finger has been released (non of tiles has been tapped)")
}
}
... 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 ).
Swift support
| Library ver| Swift ver| | ------------- |:-------------:| | 1.0.1 | 2.2 | | 1.0.2 | 2.3 | | 1.0.3 | 3.0 | | 1.1.0 | 4.0 |
Check the Demo project
Please check out the demo project, you can see there how Library has been implemented in details.
Related Skills
openhue
340.5kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
340.5kElevenLabs text-to-speech with mac-style say UX.
weather
340.5kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.5kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
