Need help with StaticDataTableViewController?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

402 Stars 46 Forks Apache License 2.0 89 Commits 0 Opened issues


Enables animated hide/show of static cells and sections

Services available


Need anything else?

Contributors list

Carthage compatible


This class enables animated hide/show of static cells and sections (created in IB, using the option Content : Static cells) for UITableView

This method doesn't use the hacky solution with setting height to 0 and allows you to animate the change and hide whole sections


  • [x] Animations on cells and sections
  • [x] Change height / Resize cells
  • [x] Not using the hacky solution with height 0
  • [x] Hide empty sections
  • [x] Control section header, footer visibility for empty sections

Demo app Created with Vernissage app

Installation with CocoaPods

To integrate StaticDataTableViewController into your Xcode project using CocoaPods, specify it in your

  pod 'StaticDataTableViewController'


Subclass your

with the
#import "StaticDataTableViewController.h"

@interface DemoTableViewController : StaticDataTableViewController


Always use this method for table view reload

- (void)reloadDataAnimated:(BOOL)animated) 

don't call

[self.tableView reloadData]

To hide/show specific cells, to which you have an outlet or an outlet collection

[self cell:self.outletToMyStaticCell1 setHidden:YES];
[self cell:self.outletToMyStaticCell2 setHidden:NO];
[self cells:self.outletToManyCells setHidden:YES];
[self reloadDataAnimated:YES];
  • if you want to hide the whole section, just create a IBOutletCollection to all its cell, and then use
    [self cells:setHidden:]

To change height of specific cells, to which you have an outlet or an outlet collection

[self cell:self.outletToMyStaticCell1 setHeight:44];
[self cell:self.outletToMyStaticCell2 setHeight:44];
[self cells:self.outletToManyCells setHeight:200];
[self reloadDataAnimated:YES];

to customize animations, just set these properties to desired values

self.insertTableViewRowAnimation = UITableViewRowAnimationRight;
self.deleteTableViewRowAnimation = UITableViewRowAnimationLeft;
self.reloadTableViewRowAnimation = UITableViewRowAnimationMiddle;

or call

with desired animation values

to control if the footer or header should be displayed, overwrite these methods in your subclass

- (BOOL)showHeaderForSection:(NSInteger)section vissibleRows:(NSInteger)vissibleRows;
- (BOOL)showFooterForSection:(NSInteger)section vissibleRows:(NSInteger)vissibleRows;


  • Create outlets to UITableViewsCells, not their content views!


Apache License 2.0:


min:60 - Building mobile solutions -

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.