Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A demo of using multiple static table views in iOS 6.
M Objective-C Matlab C C++
branch: master

README.md

test

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>

@optional


- (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;
@end

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

@protocol StaticTableViewControllerProtocol <NSObject>

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

  @optional

  - (void) deselectItemsWithAnimation: (BOOL) animation;

@end
Something went wrong with that request. Please try again.