ios - iOS 上的自定义 UIPresentationController

标签 ios cocoa-touch uipresentationcontroller

我正在自定义一个 UIPresentationController 以将演示文稿模拟为 iOS 原生 .OverCurrentContext.CurrentContext

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

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

最佳答案

尝试在呈现 View Controller 上设置 definesPresentationContext = YES

关于ios - iOS 上的自定义 UIPresentationController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36758941/

相关文章:

ios - 详细的电池使用情况-iOS

ios - 显示没有表情符号转换的行 unicode 字符

swift - 通过社交分享到 Facebook : text is not included

ios - UIPopoverPresentationController 宽度和高度未设置

ios - 为什么在呈现另一个 Controller 时 UIPresentationController 高度会发生变化?

ios - 使用 Firebase 将值与值数组进行比较。 swift

ios - 点击时如何隐藏导航栏和状态栏 - 带动画

ios - 在预设演示之前丢失对 transitioningDelegate 的引用

objective-c - 将 float 格式化为 NSString 时截断多余的零

iphone - 我什么时候应该在 Objective c 中使用 assign ?