equal
deleted
inserted
replaced
27 // load the view programmatically; we need a splitViewController that handles a MasterViewController |
27 // load the view programmatically; we need a splitViewController that handles a MasterViewController |
28 // (which is just a UITableViewController) and a DetailViewController where we present options |
28 // (which is just a UITableViewController) and a DetailViewController where we present options |
29 -(void) viewDidLoad { |
29 -(void) viewDidLoad { |
30 // init every possible controller |
30 // init every possible controller |
31 splitViewController = [[UISplitViewController alloc] init]; |
31 splitViewController = [[UISplitViewController alloc] init]; |
|
32 CGRect screensize = [[UIScreen mainScreen] bounds]; |
|
33 splitViewController.view.frame = CGRectMake(0, 0, screensize.size.height, screensize.size.width); |
32 masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain]; |
34 masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain]; |
33 detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
35 detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped]; |
34 |
36 |
35 UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; |
37 UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; |
36 UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController]; |
38 UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController]; |