在弹出框内呈现的故事板模态 segue



我的splitViewController的"master"端的一个分支中的最后一个segue是从master中的tableViewCell到tableViewController的模态(全屏)segue。

当设备横向时,一切正常,新的 tableViewController 按预期全屏显示。

但是,当设备为纵向,并且使用弹出框按钮显示主VC时,选择tableViewCell会导致模式序列在弹出框中显示新的TableVC,而不是全屏显示。

关闭模态 VC(从主弹出框内)后,弹出框的布局处于"关闭"状态,即表未针对弹出框正确自动调整大小。

谁能告诉我为什么?或者为我指出解决这个问题的正确方向......

谢谢。

默认情况下,呈现的 UIViewController 继承表示器的表示上下文。您可以通过修改要以模态方式呈现的 UIViewController 的 modalPresentationStyle 和可选的 modalTransitionStyle 来更改此设置。

UIViewController* myModalVC =  [UIViewController alloc] init]; 
myModalVC .modalPresentationStyle = UIModalPresentationFullScreen;
//myModalVC .modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;     
[self presentViewController:rViewController animated:YES completion:nil];

最新更新