【问题标题】:Insert ViewController behind another在另一个后面插入 ViewController
【发布时间】:2014-07-28 13:48:49
【问题描述】:

我目前有一个加载 webView 的主 UIViewController。基于在 webView 中单击的按钮,我有另一个 UIViewController,它在主 UIViewController 上方加载另一个 webView。

我在主 UIViewController 中做了一些类似的事情:

self.newView = [[NewUIView alloc] initWithParam:param];
if (self.currentPlayer) {
  [self presentViewController:self.newView animated:NO completion:nil];
}

我想知道是否有一种方法可以将新的 UIViewController 放在主 UIViewController 的后面

感谢任何帮助。

谢谢。

【问题讨论】:

  • 你的命名很混乱。 NewUIView 是 UIViewController 对吗?您的意思是在主 VC 的 webview 后面插入来自新 VC 的视图吗?
  • 我只是将它命名为 NewUIView 作为示例。但是,是的,NewUIView 是一个 UIViewController。我试图让 NewUIView 在主 UIViewController 后面加载。
  • 只能插入视图,不能插入VC。

标签: ios objective-c


【解决方案1】:

您可能会查看 UIViewController Containment...它允许您拥有一个视图控制器而不是另一个视图控制器:

http://www.objc.io/issue-1/containment-view-controller.html

【讨论】:

    猜你喜欢
    • 2010-11-24
    • 1970-01-01
    • 2012-07-07
    • 1970-01-01
    • 2016-06-11
    • 1970-01-01
    • 2017-09-02
    • 2015-10-05
    • 1970-01-01
    相关资源
    最近更新 更多