blob: 00f18bef032b387bdaf291c01bf5746e8c0c6315 [file] [log] [blame]
yangsu@google.com2eff7e22011-06-24 15:57:30 +00001#import "SkUINavigationController.h"
2
3@implementation SkUINavigationController
4@synthesize fRoot, fDetail;
5
yangsu@google.comc5aeccd2011-07-17 14:42:08 +00006- (void)viewDidLoad {
7 [super viewDidLoad];
yangsu@google.com2e20c242011-07-07 19:26:42 +00008 [fRoot initSamples];
yangsu@google.com2eff7e22011-06-24 15:57:30 +00009 [fDetail populateRoot:fRoot];
yangsu@google.comc5aeccd2011-07-17 14:42:08 +000010 [self pushViewController:fDetail animated:NO];
yangsu@google.com2eff7e22011-06-24 15:57:30 +000011}
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.comc5aeccd2011-07-17 14:42:08 +000023//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