尽管弹出背景颜色很清楚,但弹出视图后面有一个奇怪的阴影,这个问题只发生在 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)
Run Code Online (Sandbox Code Playgroud)