All Projects → younatics → Ynexpandablecell

younatics / Ynexpandablecell

Licence: mit
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4

Programming Languages

swift
15916 projects
swift3
66 projects

Projects that are alternatives of or similar to Ynexpandablecell

Expandablecell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5
Stars: ✭ 559 (+25.62%)
Mutual labels:  expandable, collapsible, cell
Luexpandabletableview
A subclass of UITableView with expandable and collapsible sections
Stars: ✭ 125 (-71.91%)
Mutual labels:  tableview, expandable, collapsible
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (-68.99%)
Mutual labels:  tableview, expandable, collapsible
Campcotcollectionview
Collapse and expand UICollectionView sections with one method call.
Stars: ✭ 161 (-63.82%)
Mutual labels:  expandable, collapsible
Wrcellview
自定义View,类似tableView的系统cell,使用方便 Custom View, similar to the tableView system cell, easy to use
Stars: ✭ 64 (-85.62%)
Mutual labels:  tableview, cell
Expandableview
Expandable view for Xamarin.Forms
Stars: ✭ 178 (-60%)
Mutual labels:  expandable, collapsible
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (-75.73%)
Mutual labels:  tableview, cell
Aiforms.settingsview
SettingsView for Xamarin.Forms
Stars: ✭ 274 (-38.43%)
Mutual labels:  tableview, cell
Emaccordiontableviewcontroller
Accordion effect for UITableView
Stars: ✭ 158 (-64.49%)
Mutual labels:  tableview, expandable
React Native Cell Components
Awesome react-native cell components! From a Cell to more complex & awesome components.
Stars: ✭ 177 (-60.22%)
Mutual labels:  tableview, cell
Oycountdownmanager
在cell中使用倒计时的处理方法, 全局使用一个NSTimer对象, 支持单列表.多列表.多页面.分页列表使用
Stars: ✭ 317 (-28.76%)
Mutual labels:  tableview, cell
tcscustomrowactionfactory
TCSTableViewRowActionFactory allows you to setup the swipe actions for cells in a table view using UIView and some other convenient methods
Stars: ✭ 24 (-94.61%)
Mutual labels:  tableview, cell
Expytableview
Make your table view expandable just by implementing one method.
Stars: ✭ 348 (-21.8%)
Mutual labels:  tableview, expandable
Dropdowntextview
Simple drop-down(expandable) TextView for Android
Stars: ✭ 307 (-31.01%)
Mutual labels:  expandable
React Native Tableview Simple
Flexible and lightweight React Native component for UITableView made with pure CSS
Stars: ✭ 357 (-19.78%)
Mutual labels:  tableview
Vimpyter
Edit your Jupyter notebooks in Vim/Neovim
Stars: ✭ 308 (-30.79%)
Mutual labels:  cell
React Tabulator
React Tabulator is based on tabulator - a JS table library with many advanced features.
Stars: ✭ 295 (-33.71%)
Mutual labels:  tableview
Ezplayer
基于AVPlayer封装的视频播放器,功能丰富,快速集成,可定制性强,支持react-native。
Stars: ✭ 377 (-15.28%)
Mutual labels:  tableview
Buffer
Swift μ-framework for efficient array diffs and datasource adapters.
Stars: ✭ 349 (-21.57%)
Mutual labels:  tableview
Azexpandableiconlistview
An expandable/collapsible view component written in Swift.
Stars: ✭ 284 (-36.18%)
Mutual labels:  collapsible

USE ExpandableCell. New version of this library.

YNExpandableCell

Awesome Version Carthage Compatible CocoaPods License: MIT Build Status Platform Swift 4.2

Updates

See CHANGELOG for details

Intoduction

Easiest usage of expandable & collapsible cell for iOS, written in Swift 4.2 You can customize expandable UITableViewCell whatever you like. YNExpandableCell is made because insertRows and deleteRows is hard to use. You can just inheirt YNTableViewDelegate and add one more method func tableView(_ tableView: YNTableView, expandCellAt indexPath) -> UITableViewCell?

demo

Requirements

YNExpandableCell written in Swift 3. Compatible with iOS 8.0+

Installation

Cocoapods

YNExpandableCell is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YNExpandableCell'

Carthage

github "younatics/YNExpandableCell"

Usage

import YNExpandableCell

Make YNTableView in Storyboard or in code

@IBOutlet var ynTableView: YNTableView!

Inherit YNTableViewDelegate

class ViewController: UIViewController, YNTableViewDelegate 

Set delegate and register cells

self.ynTableView.ynDelegate = self

let cells = ["YNExpandableCellEx","YNSliderCell","YNSegmentCell"]
self.ynTableView.registerCellsWith(nibNames: cells, and: cells)
self.ynTableView.registerCellsWith(cells: [UITableViewCell.self as AnyClass], and: ["YNNonExpandableCell"])

Use one of required method

Set expandable cell in YNTableViewDelegate method (Required)

func tableView(_ tableView: YNTableView, expandCellAt indexPath: IndexPath) -> UITableViewCell? {
    let ynSliderCell = tableView.dequeueReusableCell(withIdentifier: YNSliderCell.ID) as! YNSliderCell
    if indexPath.section == 0 && indexPath.row == 1 {
        return ynSliderCell
     }
     return nil
}

Set expandable cell with height in YNTableViewDelegate method using YNTableViewCell object (Required)

func tableView(_ tableView: YNTableView, expandCellWithHeightAt indexPath: IndexPath) -> YNTableViewCell? {
    let ynSliderCell = YNTableViewCell()
    ynSliderCell.cell = tableView.dequeueReusableCell(withIdentifier: YNSliderCell.ID) as! YNSliderCell
    ynSliderCell.height = 142

    if indexPath.section == 0 && indexPath.row == 1 {
        return ynSliderCell
    }
        return nil
}

Get didSelectRowAt in YNTableViewDelegate method (Optional)

func tableView(_ tableView: YNTableView, didSelectRowAt indexPath: IndexPath, isExpandableCell: Bool, isExpandedCell: Bool) {
    print("Selected Section: \(indexPath.section) Row: \(indexPath.row) isExpandableCell: \(isExpandableCell) isExpandedCell: \(isExpandedCell)")
}

Get didDeselectRowAt in YNTableViewDelegate method (Optional)

func tableView(_ tableView: YNTableView, didDeselectRowAt indexPath: IndexPath, isExpandableCell: Bool, isExpandedCell: Bool) {
    print("Deselected Section: \(indexPath.section) Row: \(indexPath.row) isExpandableCell: \(isExpandableCell) isExpandedCell: \(isExpandedCell)")
}

Set basic UITableViewDataSource, UITableViewDelegate and Done!

Customize

Expand & Collapse All if you want

self.ynTableView.expandAll()
self.ynTableView.collapseAll()

Inherit YNExpandableCell if you want awesome '+' '-' custom accessory type

class YNExpandableCellEx: YNExpandableCell

// Change normalCustomAccessoryType, selectedCustomAccessoryType Images

Cutomize UITableViewRowAnimation

self.ynTableView.ynTableViewRowAnimation = UITableViewRowAnimation.top

Make Extensions for more UITableViewDelegate if you need or make pull request for me :)

References

Please tell me or make pull request if you use this library in your application :)

@zigbang

MotionBook

Author

younatics Twitter

License

YNExpandableCell is available under the MIT license. See the LICENSE file for more info.

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].