【问题标题】:Custom UIPresentationController on iOSiOS 上的自定义 UIPresentationController
【发布时间】:2016-04-21 03:15:43
【问题描述】:

我正在自定义 UIPresentationController 以模拟 iOS 原生 .OverCurrentContext.CurrentContext 的演示文稿。

我发现无论我覆盖什么,presentingViewController 始终是 UIWindow 的rootViewController,有人知道如何使它成为sourceViewController(调用presentViewController:animated:completion:) 就像@987654328 的行为@ 演示风格?

还有一个奇怪的行为,shouldPresentInFullscreen 方法返回 true 或 false 没有区别。

【问题讨论】:

  • 你找到答案了吗?我观察到完全相同的行为。

标签: ios cocoa-touch uipresentationcontroller


【解决方案1】:

尝试在您的呈现视图控制器上设置definesPresentationContext = YES

【讨论】:

    猜你喜欢
    • 2015-10-18
    • 2020-12-04
    • 1970-01-01
    • 2018-01-01
    • 2017-02-07
    • 2014-12-21
    • 2015-01-01
    • 2012-10-06
    • 1970-01-01
    相关资源
    最近更新 更多