从superView中删除splitView控制器

时间:2013-08-31 16:49:10

标签: ios objective-c

我有一个拆分视图控制器,我将其作为子视图添加到虚拟视图控制器,然后我模拟地在我的viewController上呈现虚拟视图控制器。它工作正常,直到这里: 代码:

 ContactsViewController *contactsViewController = [[ContactsViewController alloc]init];


UINavigationController *navController = [[UINavigationController alloc]   


initWithRootViewController:contactsViewController];

MasterViewController* masterViewController = [[MasterViewController alloc]init];

UINavigationController *masterNavigationController = [[[UINavigationController alloc]   

initWithRootViewController:masterViewController] autorelease];

    self.splitViewController.viewControllers = @[masterNavigationController,  
    navController];

 UIViewController *dummyView = [[UIViewController alloc]init];

 [dummyView.view addSubview:self.splitViewController.view];

   self.splitViewController.delegate = detailViewController;

  [self.navigationController presentModalViewController:dummyView animated:YES];

  [contactsViewController release];

  [navController release];

现在问题出现在我试图解除如此出现的splitView控制器(或虚拟视图)时,无论我做什么它只是不起作用..任何想法都将非常感激......

0 个答案:

没有答案