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 | 2eff7e2 | 2011-06-24 15:57:30 +0000 | [diff] [blame] | 8 | [fDetail populateRoot:fRoot]; |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 9 | [self pushViewController:fDetail animated:NO]; |
yangsu@google.com | 2eff7e2 | 2011-06-24 15:57:30 +0000 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
| 13 | return YES; //Allow auto rotation for all orientations |
| 14 | } |
| 15 | |
| 16 | - (void)dealloc { |
| 17 | [fRoot release]; |
| 18 | [fDetail release]; |
| 19 | [super dealloc]; |
| 20 | } |
| 21 | |
yangsu@google.com | c5aeccd | 2011-07-17 14:42:08 +0000 | [diff] [blame] | 22 | //Table View Delegate Methods |
| 23 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 24 | [fDetail goToItem:indexPath.row]; |
| 25 | [self pushViewController:fDetail animated:YES]; |
| 26 | } |
| 27 | |
| 28 | @end |