在我的一个UI需求中,我想在popover中显示UISplitviewcontroller.我的代码如下。
UIViewController * vc1 = [[UIViewController alloc] init];
UIViewController * vc2 = [[UIViewController alloc] init];
UISplitViewController* splitVC = [[UISplitViewController alloc] init];
splitVC.viewControllers = [NSArray arrayWithObjects:vc1, vc2, nil];
CGFloat height = 600;
CGFloat width = 200;
_popoverController = [[UIPopoverController alloc] initWithContentViewController:splitVC];
_popoverController.popoverBackgroundViewClass = [CustomPopupoverBackground class];
[_popoverController setPopoverContentSize:CGSizeMake(width, height)];
[_popoverController presentPopoverFromRect:button.frame inView:button.superview permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
这产生了以下错误*。
'应用程序试图用全屏或自定义以外的模态展示风格来展示一个分离式视图控制器'。
*
是否可以在popover中显示splitview,如果不可以,如何在popover中同时显示两个主细节?
感谢Ritika