Ios 拆分视图控制器中的弹出视图控制器类似于iMessage?

Ios 拆分视图控制器中的弹出视图控制器类似于iMessage?,ios,iphone,objective-c,ipad,ios7,Ios,Iphone,Objective C,Ipad,Ios7,我有一个带有拆分视图控制器的应用程序。 我想有弹出视图控制器,显示,当有一些特殊情况(如用户未注册。)。 你可以在iPad上的Apple Messages应用程序中看到这一点。 有没有办法在没有第三方控制器的情况下做到这一点 编辑:我找到了解决方案:在故事板中,用户可以在atributes inspector的模拟mectrics部分设置表单。之后,使用模式转换可以打开弹出视图 If you are using Storyboard.... if using nib replace storyb

我有一个带有拆分视图控制器的应用程序。 我想有弹出视图控制器,显示,当有一些特殊情况(如用户未注册。)。 你可以在iPad上的Apple Messages应用程序中看到这一点。 有没有办法在没有第三方控制器的情况下做到这一点

编辑:我找到了解决方案:在故事板中,用户可以在atributes inspector的模拟mectrics部分设置表单。之后,使用模式转换可以打开弹出视图

If you are using Storyboard.... if using nib replace storyboard with your nib file

 // Create and configure a new detail view controller appropriate for the selection.
            UIViewController *objViewController = [UINavigationController new];

            objViewController = [self.storyboard                                   instantiateViewControllerWithIdentifier:@"WelcomePopupNavigationController"];                

            objViewController.modalPresentationStyle = UIModalPresentationFormSheet;
            objViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;

            [self presentViewController:objViewController animated:YES completion:nil];

            //it's good to do this after presentModalViewController, but not neccessary if you using form sheet size of your view controller
            objViewController.view.superview.frame = CGRectMake(0, 0, 540, 620);
            objViewController.view.superview.center = self.view.center;

//vKj

objViewController.modalPresentationStyle=UIModalPresentationFormSheet这行是宝藏的钥匙。谢谢!