我正在尝试解决这篇博客文章中描述的问题:http://justabeech.com/2014/10/22/using-uivisualeffectview-in-a-modal-view-controller/
我有一个包含故事板模式转场的UIViewController
,其背景颜色为[UIColor clearColor]
,并带有一个UIVisualEffectView
的UIView
。
当我展示视图控制器时,视觉效果会变得模糊,直到过渡完成,然后背景再次变灰(与该博客文章中显示的gif完全相同)。
我将 Modal Transition Style 设置为 FullScreen,但仍然存在同样的问题。我还缺少什么来使它正常工作?
编辑:我还收到以下错误:
Warning: Attempt to present <ClocksDetailViewController: 0x7ff89cb5bc70> on <ClocksViewController: 0x7ff89c8afe90> whose view is not in the window hierarchy!
谢谢
UIModalPresentationOverFullScreen
,还是用的UIModalPresentationFullScreen
?请注意它们之间的区别。 - Sulthan