Skip to content
A demo of using multiple static table views in iOS 6.
M Objective-C Matlab C C++
Find file
Latest commit 753335a @DuncanMC Documentation cleanup


A demo of using multiple static table views in iOS 6.

This project shows how to set up mutiple UITableViewControllers on a single screen. It uses a parent view controller with container views and a pair of UITableViewControllers as child view controllers. The parent view controller has "container" views in it, that link to the UITableViewControllers using embed segues.

The screen looks like this:

->app screenshot<-

The project defines a protocol that the parent view controller uses to communicate with the child UITableViewControllers, and a second protocol that the children use to notify the parent when the user makes a selection or clicks a button.

The StaticTableParentProtocol defines 2 methods, which are both optional:

@protocol StaticTableParentProtocol <NSObject>


- (void) tableView: (UITableView *) tableView
         didSelect: (BOOL) select
   cellAtIndexPath: (NSIndexPath *)indexPath
 inViewController : (UIViewController <StaticTableViewControllerProtocol> *) viewController;

- (void) tableView: (UITableView *) tableView
     clickedButton: (UIButton *) button
       atIndexPath: (NSIndexPath *) buttonIndexPath
  inViewController: (UITableViewController <StaticTableViewControllerProtocol>*) viewController;

And the StaticTableViewControllerProtocol defines a delegate property and 1 method, which is also optional:

@protocol StaticTableViewControllerProtocol <NSObject>

  @property (nonatomic, weak) UIViewController <StaticTableParentProtocol> *delegate;


  - (void) deselectItemsWithAnimation: (BOOL) animation;

Something went wrong with that request. Please try again.