All Projects → robertherdzik → Rhpreviewcell

robertherdzik / Rhpreviewcell

Licence: mit
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💥.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Rhpreviewcell

Autolayoutexamplewithmasonry
Different Autolayout examples with Masonry. 用Masonry写的Autolayout案例,持续更新中。详细解答请看tutuge.me
Stars: ✭ 694 (+79.79%)
Mutual labels:  demo, uitableviewcell
T Rec Rs
Blazingly fast terminal recorder that generates animated gif images for the web written in rust
Stars: ✭ 361 (-6.48%)
Mutual labels:  demo
Androidtoapplevectorlogo
An Android app demoing pathmorphing with AnimatedVectorDrawables
Stars: ✭ 344 (-10.88%)
Mutual labels:  demo
Hackathon Toolkit
GCP Hackathon Toolkit
Stars: ✭ 358 (-7.25%)
Mutual labels:  demo
Vokuro
Sample application for Phalcon Framework (Acl, Auth, Security)
Stars: ✭ 350 (-9.33%)
Mutual labels:  demo
Jquery.scrollto
Lightweight, cross-browser and highly customizable animated scrolling with jQuery
Stars: ✭ 3,609 (+834.97%)
Mutual labels:  demo
Autoops
linux资产管理,cmdb,django, webssh,运维管理平台,数据库操作平台 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 340 (-11.92%)
Mutual labels:  demo
Esp32 tft library
Full featured TFT library for ESP32 with demo application
Stars: ✭ 383 (-0.78%)
Mutual labels:  demo
Explicit Architecture Php
This repository is a demo of Explicit Architecture, using the Symfony Demo Application.
Stars: ✭ 372 (-3.63%)
Mutual labels:  demo
React Native Socket Io Example
A demo for implementing a mobile chatroom
Stars: ✭ 358 (-7.25%)
Mutual labels:  demo
Unsplashexplorer Coreml
Core ML demo app with Unsplash API
Stars: ✭ 358 (-7.25%)
Mutual labels:  demo
Examplesforcesium
My personal examples for Cesium, hopefully may it help you to build this beautiful world~
Stars: ✭ 350 (-9.33%)
Mutual labels:  demo
Paonet
【MVVM+RxJava2+AspectJ】泡网第三方客户端,网站主页:http://www.jcodecraeer.com/index.php
Stars: ✭ 374 (-3.11%)
Mutual labels:  demo
Wireframe World
An infinite wireframe world in WebGL
Stars: ✭ 347 (-10.1%)
Mutual labels:  demo
Raasnet
Open-Source Ransomware As A Service for Linux, MacOS and Windows
Stars: ✭ 371 (-3.89%)
Mutual labels:  demo
Koa Vue Notes Api
🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and async/await.
Stars: ✭ 342 (-11.4%)
Mutual labels:  demo
Ssm booksystem
ssm demo,ssm详细教程,SSM简明教程:简单的十步教你搭建人生第一个SSM框架[ SSM框架整合教程(spring+spring mvc+mybatis+redis+maven+idea+bootstrap) ]
Stars: ✭ 355 (-8.03%)
Mutual labels:  demo
Uitableviewdynamiclayoutcacheheight
🖖高性能的自动计算采用 Autolayout 布局的 UITableViewCell 和 UITableViewHeaderFooterView 的高度,内部自动管理高度缓存。
Stars: ✭ 360 (-6.74%)
Mutual labels:  uitableviewcell
Eaintroview
Highly customizable drop-in solution for introduction views.
Stars: ✭ 3,759 (+873.83%)
Mutual labels:  demo
Cocos Awesome
基于cocos creator游戏引擎的游戏常用功能模块集锦,以及shader特效实现集锦
Stars: ✭ 381 (-1.3%)
Mutual labels:  demo

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].