cocoaTouch/SplitViewRootController.m
changeset 3332 3c90a923f156
parent 3323 091cf214bdd5
child 3335 2520ee7a5484
equal deleted inserted replaced
3331:8e05feb871c3 3332:3c90a923f156
    42         MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
    42         MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
    43         
    43         
    44         UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
    44         UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
    45     
    45     
    46         masterViewController.detailViewController = self.detailViewController;
    46         masterViewController.detailViewController = self.detailViewController;
    47                 NSLog(@"%d", [detailViewController retainCount]);
       
    48 
    47 
    49         [masterViewController release];
    48         [masterViewController release];
    50 
    49 
    51         [splitViewRootController setViewControllers:[NSArray arrayWithObjects: mainNavController, detailedNavController, nil]];
    50         [splitViewRootController setViewControllers:[NSArray arrayWithObjects: mainNavController, detailedNavController, nil]];
    52         [mainNavController release];
    51         [mainNavController release];
    53         [detailedNavController release];
    52         [detailedNavController release];
    54         
    53         
    55         [splitViewRootController setDelegate: self.detailViewController];
    54         [splitViewRootController setDelegate: self.detailViewController];
    56         [detailViewController release];
    55         [detailViewController release];
    57                 NSLog(@"%d", [detailViewController retainCount]);
       
    58 
    56 
    59         // add view to main controller
    57         // add view to main controller
    60         [self.view addSubview:[splitViewRootController view]];
    58         [self.view addSubview:[splitViewRootController view]];
    61         //[splitViewRootController release];
    59         //[splitViewRootController release];
    62 
    60