Permalink
Browse files

Set the example controller titles automatically

  • Loading branch information...
1 parent 4e7e914 commit ba09bbbdaa5728cd61add8eb519ae538b7db0649 @lukeredpath committed Aug 11, 2010
@@ -103,6 +103,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
NSDictionary *exampleData = [self.examplesTableModel objectAtIndexPath:indexPath];
UIViewController *exampleViewController = [[NSClassFromString([exampleData valueForKey:@"controller"]) alloc] init];
+ exampleViewController.title = [exampleData valueForKey:@"name"];
[self.navigationController pushViewController:exampleViewController animated:YES];
[exampleViewController release];
}
@@ -27,7 +27,6 @@ - (void)viewDidLoad
{
[super viewDidLoad];
- self.title = @"Grouped";
self.tableView.dataSource = self.tableModel;
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(rotateButtonTapped:)] autorelease];
@@ -35,7 +35,6 @@ - (void)viewDidLoad
{
[super viewDidLoad];
- self.title = @"Searchable Table View";
self.tableView.rowHeight = 65;
self.searchDisplayController.searchResultsTableView.rowHeight = self.tableView.rowHeight;
@@ -35,7 +35,6 @@ - (void)viewDidLoad
[self configureToolbarItems];
- self.title = @"Simple Table View";
self.tableView.rowHeight = 65;
self.tableView.dataSource = self.tableModel;

0 comments on commit ba09bbb

Please sign in to comment.