我正在自定义一个 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/