iOS 8 - 无法使 UIModalPresentationFormSheet 透明

Posted

技术标签:

【中文标题】iOS 8 - 无法使 UIModalPresentationFormSheet 透明【英文标题】:iOS 8 - Unable to make the UIModalPresentationFormSheet transparent 【发布时间】:2014-10-01 08:34:51 【问题描述】:

ios 7 中,我有一段代码与

中提到的要求类似
    How do I make the flip animation on a modal view on the iPad transparent in the background?

    Seamlessly flip from one modal view to another, without showing a solid colour background

我在 iOS 7 中实现它的方式是使用这个问题中提到的方法 UIModalPresentationFormSheet can't change superview background to clear

到目前为止运行良好,直到 Apple 发布 iOS 8。在 iOS 8 中,modController.view.superView 返回 nil,这通过显示灰色背景极大地影响了我的动画。如果有人知道如何解决这个问题,那将是一个很大的帮助。提前致谢。

【问题讨论】:

【参考方案1】:

现在通过创建自定义 UIView 来修复它。

【讨论】:

我也遇到了同样的问题,能帮忙吗?

以上是关于iOS 8 - 无法使 UIModalPresentationFormSheet 透明的主要内容,如果未能解决你的问题,请参考以下文章