All Projects → ennioma → Emaccordiontableviewcontroller

ennioma / Emaccordiontableviewcontroller

Licence: mit
Accordion effect for UITableView

Projects that are alternatives of or similar to Emaccordiontableviewcontroller

ListViewWithSubListView
Xamarin.Forms Expandable ListView With Sub-ListView MVVM Pattern
Stars: ✭ 40 (-74.68%)
Mutual labels:  accordion, expandable
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (-12.66%)
Mutual labels:  tableview, expandable
Luexpandabletableview
A subclass of UITableView with expandable and collapsible sections
Stars: ✭ 125 (-20.89%)
Mutual labels:  tableview, expandable
Accordion-Collapse-react-native
React native Accordion/Collapse component, very good to use in toggles & show/hide content
Stars: ✭ 147 (-6.96%)
Mutual labels:  accordion, expandable
Expytableview
Make your table view expandable just by implementing one method.
Stars: ✭ 348 (+120.25%)
Mutual labels:  tableview, expandable
Ynexpandablecell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4
Stars: ✭ 445 (+181.65%)
Mutual labels:  tableview, expandable
Accordionswift
The best way of implement an accordion menu using an UITableView in Swift
Stars: ✭ 156 (-1.27%)
Mutual labels:  tableview, accordion
Rxasdatasources
RxDataSource for AsyncDisplayKit/Texture
Stars: ✭ 114 (-27.85%)
Mutual labels:  tableview
Poweradapter
Adapter for RecyclerView(only 21KB).RecyclerView万能适配器(仅21KB)
Stars: ✭ 112 (-29.11%)
Mutual labels:  expandable
Tdbadgedcell
TDBadgedCell is a table view cell class that adds a badge, similar to the badges in Apple's own apps
Stars: ✭ 1,444 (+813.92%)
Mutual labels:  tableview
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (-31.65%)
Mutual labels:  tableview
Hibiscus.js
Native Angular directives for Bootstrap4
Stars: ✭ 115 (-27.22%)
Mutual labels:  accordion
Arsegmentpager
segment tab controller with parallax Header
Stars: ✭ 1,691 (+970.25%)
Mutual labels:  tableview
Mdtable
A data-driven UITableView framework
Stars: ✭ 153 (-3.16%)
Mutual labels:  tableview
Ios Multiselectiontable
Beautiful way of having a multi-selection table on iOS written in Swift
Stars: ✭ 156 (-1.27%)
Mutual labels:  tableview
Niui
Lightweight, feature-rich, accessible front-end library
Stars: ✭ 152 (-3.8%)
Mutual labels:  accordion
Xlslideswitch
iOS 仿照今日头条滚动列表
Stars: ✭ 136 (-13.92%)
Mutual labels:  tableview
A11y accordions
ES5 ARIA Accordion Component
Stars: ✭ 108 (-31.65%)
Mutual labels:  accordion
Tableview
A RecyclerView that looks like a TableView, can scroll horizontally and vertically with a fixed header at the same time.
Stars: ✭ 135 (-14.56%)
Mutual labels:  tableview
Houdini
A simple, accessible show-and-hide/accordion script.
Stars: ✭ 148 (-6.33%)
Mutual labels:  accordion

EMAccordionTableViewController

N|Solid

EMAccordionTableViewController is a easy to use Expandable / Collapsable UITableView for iOS. Under the hood it works as a proxy for the UITableView and leaves to the delegate the responsability to implement tableView:cellForRowAtIndexPath and tableView:didSelectRowAtIndexPath.

Update: Now it support the header view with parallax effect. I have used UIImage+ImageEffects from wwdc2013 to support the blur.

  • Built to be Universal
  • Support rotation
  • Completely reusable component

Apps that use the controller

How to install it?

CocoaPods

The recommended approach is to install EMAccordionTableViewController via CocoaPods.

platform :ios, '6.0'
pod 'EMAccordionTableViewController', '~> 0.5.4'

And then install it running

$ pod install

And now open the project in Xcode from the .xcworkspace file, not from the project file

$ open YourOwnProject.xcworkspace

Source Code

Alternatively you can just copy all the files included in the folder EMAccordionTable and start playing with it!

How it works?

EMAccordionTableViewController Class

@interface EMAccordionTableViewController : UIViewController<UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UIImage * closedSectionIcon;
@property (nonatomic, strong) UIImage * openedSectionIcon;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) EMAccordionTableParallaxHeaderView *parallaxHeaderView;
@property (nonatomic, strong) NSMutableArray *sectionsHeaders;
@property (nonatomic) NSInteger defaultOpenedSection;

- (id) initWithTable:(UITableView *)tableView withAnimationType:(EMAnimationType) type;

- (void) addAccordionSection: (EMAccordionSection *) section initiallyOpened:(BOOL)opened;
- (void) setDelegate: (NSObject <EMAccordionTableDelegate> *) delegate;

@end
### EMAccordionTableDelegate Protocol
@protocol EMAccordionTableDelegate
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
- (void) latestSectionOpened;
@end

EMAccordionSection Class

@interface EMAccordionSection : NSObject

@property (nonatomic, strong) UIColor *backgroundColor;
@property (nonatomic, strong) NSMutableArray *items;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) UIColor *titleColor;
@property (nonatomic, strong) UIFont *titleFont;

@end

TODO

  • Give the possibility to open a section clicking on the section itself instead of the icon
  • Give the possibility to open a section programmatically

Help me improving this!

How? Simply feel free to fork the project and improve it!

If you would like to contact me: Twitter: ennioma. Email: [email protected]

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