Remove dimming view behind UIPopoverPresentationController

故事扮演 提交于 2019-12-08 03:57:50

问题


I'm trying to remove the dimming view behind a popover presented using UIPopoverPresentationController. I've implemented a custom UIPopoverBackgroundView, but there doesn't seem to be a way to get rid of this dimming view.

I've tracked the dimming view to a "_UIMirrorNinePatchView" using the view hierarchy inspector, but there's no good way of removing it short of crawling through the subviews of UIWindow and manually removing this view from its superview. This approach is flawed as it briefly flashes the dimming view before it's removed.

Any suggestions?


回答1:


Set the backgroundColor property to .clear

popOverPresentationController.backgroundColor = .clear



来源:https://stackoverflow.com/questions/39925699/remove-dimming-view-behind-uipopoverpresentationcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!