仅适用于iOS 13.1和13.2中弹出视图后面的怪异阴影

问题描述 投票:4回答:1

即使弹出背景色很明显,但在弹出视图后面仍然有一个奇怪的阴影,这个问题仅在13.1和13.2中才会发生,并且在13及以下版本中仍然可以正常工作

我可以在视图层次结构中看到UIWindow / UITransitionView / _UICutoutShadowView具有仅在13.1中具有阴影图像的图像视图,而在13中具有空白图像的图像视图>]

controller.modalPresentationStyle = .popover
controller.popoverPresentationController?.permittedArrowDirections = .up
controller.popoverPresentationController?.delegate = controller
controller.popoverPresentationController?.sourceView = sourceView
controller.popoverPresentationController?.popoverBackgroundViewClass = FilterBackgroundView.self
present(controller, animated: false)

strange shadow image

即使弹出背景色清晰可见,但在弹出视图后面仍然有一个怪异的阴影,这个问题仅在13.1和13.2中才会发生,并且在13和以下版本中工作正常,我可以在...中看到...

ios swift ios13 uipopovercontroller uipopover
1个回答
1
投票

在UI上检查是否存在导致它的_UICutoutShadowView类型的UIImageView。因此,我设法通过创建自定义UIPopoverBackgroundView并隐藏此幻影视图来解决此问题。

© www.soinside.com 2019 - 2024. All rights reserved.