我试图弄清楚是否有办法呈现一个不是全屏的UIViewController。它应该是自定义大小&不是使用modalPresentationStyle可以实现的。
I am trying to figure out if there is a way to present a UIViewController which is not full screen. It should be of custom size & not what can be achieved using modalPresentationStyle.
我想用UINavigationController创建一个类似本地Twitter / Facebook共享表大小的视图,这样我就可以推送/弹出更多的UIViewControllers。它适用于iPhone和iPad。
I wanted to create a view like the native Twitter/Facebook sharing sheet's size with UINavigationController so that I can push/pop more UIViewControllers. It should work for iPhone and iPad.
推荐答案您可以使用View Controller Containment来执行此操作。请参阅 http中的实现容器视图控制器 ://developer.apple/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html 了解更多信息。基本上你只需要调用addChildViewController:在将子视图添加到视图之前,并在删除它之前删除.FromParentViewController:
You can use View Controller Containment to do this. See "Implementing A Container View Controller" at developer.apple/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html for more info. Basically you just need to call addChildViewController: before adding the child's view to your view, and removeFromParentViewController: before removing it.
更多推荐
PresentViewController是一个带有UINavigationController的非全屏UIViewController
发布评论