【问题标题】:Using a custom UIPresentationController with horizontally compact UITraitCollection, but a popover otherwise使用具有水平紧凑 UITraitCollection 的自定义 UIPresentationController,否则会弹出一个
【发布时间】:2016-05-31 08:43:15
【问题描述】:

我有一个在通用 iOS 应用程序中呈现的视图控制器。在 iPhone 上,它使用自定义 UIPresentationController 显示,该控制器使用 UIPresentationControllerframeOfPresentedViewInContainerView 方法调整呈现视图的框架。这工作正常,但是...

在 iPad 上,当UITraitCollection 具有Regular 宽度时,我希望相同的视图控制器显示为弹出框,但在Compact 宽度时切换到我的自定义 UIPresentationController。这可以实现吗?

【问题讨论】:

  • 如何在这两者之间进行轮换?删除和替换?
  • @ndg : ipad 中的兼容宽度可用是什么意思?你的意思是纵向???

标签: ios uikit uipresentationcontroller


【解决方案1】:

这是不可能的。直接来自苹果的"What's new in iOS8 guide"

由于可用的屏幕空间量,iPad 在纵向和横向的垂直和水平方向都有一个常规尺寸等级。

【讨论】:

    猜你喜欢
    • 2020-11-01
    • 2022-10-13
    • 1970-01-01
    • 2017-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-15
    • 1970-01-01
    相关资源
    最近更新 更多