Link controllers

This commit is contained in:
Roman Efimov
2013-06-04 10:21:18 -05:00
parent d64e46ab6b
commit c74147a6bb
2 changed files with 12 additions and 0 deletions

View File

@@ -20,6 +20,12 @@
_manager = [[RETableViewManager alloc] initWithTableView:self.tableView];
_section = [RETableViewSection section];
[_manager addSection:_section];
[_section addItem:@"Test item 1"];
[_section addItem:@"Test item 2"];
[_section addItem:@"Test item 3"];
}
@end

View File

@@ -10,6 +10,7 @@
#import "ControlsViewController.h"
#import "ListViewController.h"
#import "EditingViewController.h"
#import "RetractableViewController.h"
@interface RootViewController ()
@@ -47,6 +48,11 @@
[weakSelf.tableView deselectRowAtIndexPath:item.indexPath animated:YES];
[weakSelf.navigationController pushViewController:[[EditingViewController alloc] initWithStyle:UITableViewStyleGrouped] animated:YES];
}]];
[section addItem:[RETableViewItem itemWithTitle:@"Retractable" accessoryType:UITableViewCellAccessoryDisclosureIndicator selectionHandler:^(RETableViewItem *item) {
[weakSelf.tableView deselectRowAtIndexPath:item.indexPath animated:YES];
[weakSelf.navigationController pushViewController:[[RetractableViewController alloc] initWithStyle:UITableViewStyleGrouped] animated:YES];
}]];
}
@end