| yangsu@google.com | 2eff7e2 | 2011-06-24 15:57:30 +0000 | [diff] [blame] | 1 | #import "SkUINavigationController.h" |
| 2 | |
| 3 | @implementation SkUINavigationController |
| 4 | @synthesize fRoot, fDetail; |
| 5 | |
| yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame^] | 6 | - (void)viewDidLoad { |
| 7 | [super viewDidLoad]; |
| yangsu@google.com | 2e20c24 | 2011-07-07 19:26:42 +0000 | [diff] [blame] | 8 | [fRoot initSamples]; |
| yangsu@google.com | 2eff7e2 | 2011-06-24 15:57:30 +0000 | [diff] [blame] | 9 | [fDetail populateRoot:fRoot]; |
| yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame^] | 10 | [self pushViewController:fDetail animated:NO]; |
| yangsu@google.com | 2eff7e2 | 2011-06-24 15:57:30 +0000 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
| 14 | return YES; //Allow auto rotation for all orientations |
| 15 | } |
| 16 | |
| 17 | - (void)dealloc { |
| 18 | [fRoot release]; |
| 19 | [fDetail release]; |
| 20 | [super dealloc]; |
| 21 | } |
| 22 | |
| yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame^] | 23 | //Table View Delegate Methods |
| 24 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 25 | [fDetail goToItem:indexPath.row]; |
| 26 | [self pushViewController:fDetail animated:YES]; |
| 27 | } |
| 28 | |
| 29 | @end |