Simple accordion view in Cocoa Touch
Objective-C Ruby
Latest commit 865a63d Apr 3, 2016 @suda suda Update readme
Failed to load latest commit information.
Example Fixed example Oct 18, 2014
.gitignore Workplace cleanup Dec 18, 2012
AccordionView.h Cleanup Oct 18, 2014
AccordionView.m Fixed example Oct 18, 2014
AccordionView.podspec Updated version to 0.0.5 Oct 18, 2014 Update readme Apr 3, 2016 Added license Sep 21, 2013 Update readme Apr 3, 2016


Very simple accordion view in Cocoa Touch.


AccordionView *accordion = [[AccordionView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)];
[self addSubview:accordion];

// Only height is taken into account, so other parameters are just dummy
UIButton *header1 = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 0, 30)];
[header1 setTitle:@"First row" forState:UIControlStateNormal];

UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 200)];
// ... add subviews to view1

[accordion addHeader:header1 withView:view1];

// ... add more panels

[accordion setNeedsLayout];

// Set this if you want to allow multiple selection
[accordion setAllowsMultipleSelection:YES];

// Set this to NO if you want to have at least one open section at all times
[accordion setAllowsEmptySelection:YES];

// Remove section at index 1
[accordion removeHeaderAtIndex:1];


  • Horizontal view
  • Swift bridge

Contributions welcome

All contributions (no matter if small) are always welcome.

To see how you can help and where to start see Contributing file.


Copyright (C) 2011-2014 Wojtek Siudzinski, Appsome

Licensed under the Apache License, Version 2.0: