简体   繁体   中英

Presenting a View controller only in the DetailViewController of UISplitViewController

I am working with UISplitViewController, and I want to present a VC from the detail view controller of the splitViewController. I do it like this:

[self presentModalViewController:VC animated:YES]; 

also tried this from master VC.

[self.detailVC presentModalViewController:VC animated:YES]; 

It comes for the full screen I mean it is like presenting from the UISplitViewController itself. I tried changing the modal presentation styles even though I got the same results.

What I want is the VC that is presented should be presented within the bounds of the DetailVC and it can be of DetailVC's entire frame, but not come anywhere near to the MasterVC.

For now I am using UIView Animation to achieve this, any ideas on how to do this just by presenting?

As of Xcode 6:

In the storyboard, select the present modally segue, and go to the Identity Inspector, and choose Current Context for the Presentation option.

在此处输入图片说明

您的详细视图控制器应该在导航控制器内部,然后将其他视图控制器推入导航控制器,而不是模态地。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM