| // | |
| // RootViewController.m | |
| // iPhoneExample | |
| // | |
| // Created by Erik Doernenburg on 20/07/10. | |
| // Copyright Mulle Kybernetik 2010. All rights reserved. | |
| // | |
| #import "RootViewController.h" | |
| @implementation RootViewController | |
| #pragma mark - | |
| #pragma mark Table view data source | |
| // Customize the number of sections in the table view. | |
| - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
| return 1; | |
| } | |
| // Customize the number of rows in the table view. | |
| - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
| return 1; | |
| } | |
| // Customize the appearance of table view cells. | |
| - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| static NSString *CellIdentifier = @"HelloWorldCell"; | |
| UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
| if (cell == nil) { | |
| cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; | |
| } | |
| cell.textLabel.text = @"Hello World!"; | |
| return cell; | |
| } | |
| #pragma mark - | |
| #pragma mark Table view delegate | |
| - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| /* | |
| <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; | |
| // ... | |
| // Pass the selected object to the new view controller. | |
| [self.navigationController pushViewController:detailViewController animated:YES]; | |
| [detailViewController release]; | |
| */ | |
| } | |
| @end | |