iPad Split View Call/Load from another view

后端 未结 2 1421
感情败类
感情败类 2021-01-14 23:24

Please help me with the issue mentioned below.

My issue is, whether there is way to call the split view from another view, say after I tap on a button..?

For

2条回答
  •  [愿得一人]
    2021-01-15 00:12

    i m do this type but i am not get split view

    • (void)viewDidLoad { [super viewDidLoad];

      MainViewController *first =[[MainViewController alloc]initWithNibName:@"MainViewController" bundle:nil];

      UINavigationController *sec=[[UINavigationController alloc]initWithRootViewController:first];

      DetailViewController *detail =[[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil]; UINavigationController *detailv =[[UINavigationController alloc]initWithRootViewController:detail];

      UISplitViewController *split =[[UISplitViewController alloc]init];

      split.viewControllers=[NSArray arrayWithObjects:sec,detailv, nil];

      // split.delegate=detail;

      split.delegate =self;

      //first.detail=detail;

      appDel = (AppDelegate*)[[UIApplication sharedApplication] delegate];

      window1 = [appDel window];

      UINavigationController *mainNav =[[UINavigationController alloc]init];

      mainNav = [appDel nav]; [mainNav.view removeFromSuperview];

      [window1 addSubview:split.view];

      // Do any additional setup after loading the view from its nib. }

提交回复
热议问题