0

I'd like to know simply if it is possible to present a modal view controller in an iPad application that is using the UISplitView Controller. Thank You

EDIT:

This is the code:

NewPlayerViewController *newPlayerView;

newPlayerView = [[NewPlayerViewController alloc] initWithNibName:@"NewPlayerViewController" bundle:nil];
[newPlayerView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[bodyView presentModalViewController:newPlayerView animated:YES];

[newPlayerView release];
IssamTP
  • 2,408
  • 1
  • 25
  • 48

1 Answers1

1

Yes, just call presentModalViewController:animated: from any view controller.

  • bodyView is the View Controller on the right and it's not nil. It seems that I can't launch this operation in viewDidLoad. – IssamTP Dec 16 '10 at 15:22
  • 1
    Call it in viewDidAppear, or, if you must call it from viewDidLoad, move that code to a method (eg. presentNewPlayerView) and call that method from viewDidLoad using `[bodyView performSelector:@selector(presentNewPlayerView) withObject:nil afterDelay:0];`. –  Dec 16 '10 at 15:28
  • Just a note: if you do it in viewDidAppear, you'll need to add some logic so it only presents on the first viewDidAppear since that method will fire again when you dismiss the modal view controller. –  Dec 16 '10 at 15:39
  • well it works for me also.But there is strange problem, my navigation bar is never visible, so I cannot go back to previous screen.Please help! – Swastik Dec 20 '10 at 12:37
  • I am basically presenting my detailView as ModalView – Swastik Dec 20 '10 at 12:37