RHPreviewCell - I envied so much Spotify iOS app this great playlist preview cell ๐Ÿ˜

Overview

Version License Platform Language Twitter

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 ๐Ÿ˜Ž

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.

You might also like...
Classical music front-end for Apple Music: iOS app

concertino_ios Concertino is a classical music front-end for Apple Music. It's splitted in several projects. This one provides only the iOS app. (Ther

Voice Memos is an audio recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Swift.
Voice Memos is an audio recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Swift.

VoiceMemos Voice Memos is a voice recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Sw

iOS music player app that downloads music from the internet, even YouTube
iOS music player app that downloads music from the internet, even YouTube

About YouTag is an iOS music player app that downloads music from the internet, even YouTube, and manages it in a local library. Music videos can also

MuVis is a macOS, iOS, iPadOS app for real-time music visualization.
MuVis is a macOS, iOS, iPadOS app for real-time music visualization.

MuVis MuVis is an open-source multiplatform app (using SwiftUI, Swift, and Xcode) for music visualization. It renders informative (and musically usefu

An automated insulin delivery app template for iOS, built on LoopKit
An automated insulin delivery app template for iOS, built on LoopKit

Loop for iOS Loop is an app template for building an automated insulin delivery system. It is a stone resting on the boulders of work done by many oth

Fast Campus iOS App Development All-in-one Package Online Clone Coding
Fast Campus iOS App Development All-in-one Package Online Clone Coding

์• ํ”Œ๋ฎค์ง ํด๋ก  ์ฝ”๋”ฉ ํŒจ์ŠคํŠธ์บ ํผ์Šค iOS ์•ฑ ๊ฐœ๋ฐœ ์˜ฌ์ธ์› ํŒจํ‚ค์ง€ Online ํด๋ก ์ฝ”๋”ฉ ์‚ฌ์šฉ์š”์†Œ UICollectionReusableView , c

Sentiments is an iOS app written in Swift that analyzes text for positive or negative sentiment
Sentiments is an iOS app written in Swift that analyzes text for positive or negative sentiment

Sentiments Sentiments is an iOS app written in Swift that analyzes text for positive or negative sentiment. Positive sentiment is highlighted in green

11t is an iOS and Android app for connecting to Mastodon, written in Flutter.

README 11t is an iOS and Android app for connecting to Mastodon, written in Flutter. I connect to Mastodon on mastodon.social, but everyone can start

Meow-Speech - IOS app - Text to Speech
Meow-Speech - IOS app - Text to Speech

Meow-Speech IOS app - Text to Speech All licensed code belongs to the respective

Releases(1.1.0)
Owner
Robert Herdzik
iOS Developer ๐ŸŒถ
Robert Herdzik
A tiny menu bar app detecting the chords of the songs you are listening on iTunes or Spotify.

ChordDetector A tiny menu bar app that listens iTunes and Spotify to detect chords of songs! Demo Features iTunes and Spotify support. Saves up to 20

Cem Olcay 72 Dec 26, 2022
macOS app that allows the control of Spotify and AppleMusic/iTunes music playback from the menu bar.

PlayStatus is a simple macOS app that allows the control of Spotify, Apple Music(macOS 10.15+) and iTunes including iTunes Radio/Beats1 playback from

Nikhil Bolar 114 Dec 28, 2022
A simple Spotify lyrics viewer menu bar app for macOS in Swift 3

lyricsify This is a simple macOS menu bar application that shows you the lyrics of current playing spotify track. All the lyricses are from Wikia webs

Mohamad Jahani 85 Dec 31, 2022
A pure Swift Spotify Music App in Apple Music style

HBMusic A pure Swift Spotify Music App in Apple Music style. How to run pod inst

haoboxuxu 6 Dec 29, 2021
HomeHub - Swift app to control my home's smart devices + show spotify current playback

HomeHub iPad app to control my home's smart devices + show spotify current playb

Cooper Bell 2 Oct 22, 2022
A real-time, votable, democratized music queue on iPad and iPhone using Spotify

Queue'd Music Queue'd is the best way to enjoy music with your friends. Add your favorite songs to a shared music queue at your favorite bars, restaur

Ryan Daulton 88 Dec 2, 2022
Dead-simple queue-oriented client for Spotify

Spotiqueue A terribly simple macOS app for keyboard-based, queue-oriented Spotify use. Many years ago i built a version which relied on a now-deprecat

paul 74 Dec 3, 2022
A Spotify clone created using SwiftUI

Spotify Clone Its a Spotify clone created using SwiftUI. Deployment To deploy th

Manav Deep Singh Lamba 1 Jan 17, 2022
AIB indicates for your app users which audio is playing. Just like the Podcasts app.

Audio Indicator Bars for iOS and tvOS Indicates for your app users which audio is playing. Just like the Podcasts app. Index Requirements and Details

Leonardo Cardoso 285 Nov 23, 2022
AudioKit Synth One: Open-Source iOS Synthesizer App

AudioKit Synth One We've open-sourced the code for this synthesizer so that everyone is able to make changes to the code, introduce new features, fix

AudioKit 1.5k Dec 25, 2022