开发者

Multiple Views in iPad

开发者 https://www.devze.com 2023-02-17 01:00 出处:网络
Trying to open a second detail view from a detail view controller in a split view controller. Not even having any luck amending Apple\'s MultipleDetailViews sample project.

Trying to open a second detail view from a detail view controller in a split view controller.

Not even having any luck amending Apple's MultipleDetailViews sample project.

-(IBAction)subViewButtonClicked
{
    UIViewController <Sub开发者_开发百科stitutableDetailViewController> *detailViewController = nil;

    SubDetailViewController *subDetailViewContoller = [[SubDetailViewController alloc] initWithNibName:@"SubDetailViewController" bundle:nil];
    detailViewController = subDetailViewContoller;

    // Update the split view controller's view controllers array.
    NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailViewController, nil];
    splitViewController.viewControllers = viewControllers;

    [viewControllers release];   
}

Any help appreciated.


The example project allowed the reuse of xibs and views to fix my issue perfectly.

0

精彩评论

暂无评论...
验证码 换一张
取 消