简体   繁体   English

视图 controller 已加载后,模糊视图背景变为不透明

[英]Blur View background turns opaque after view controller has loaded

My social media app has a Feed view controller embedded in a navigation controller with a search button as a bar button item.我的社交媒体应用程序有一个 Feed 视图 controller 嵌入在导航 controller 中,并带有一个搜索按钮作为条形按钮项。 Upon clicking the search button, a search view controller embedded in a different navigation controller is pushed with a blurred background.单击搜索按钮后,嵌入在不同导航 controller 中的搜索视图 controller 被推送,背景模糊。 This segue is done via Storyboard.这个 segue 是通过 Storyboard 完成的。 The blurred background sustains for a half second before turning opaque.模糊的背景会持续半秒,然后变得不透明。 My assumption is that once the search view controller loads, the root view controller changes from the Feed view controller to the Search view controller.我的假设是,一旦搜索查看controller负载,root View Z594C103F2C3D8B059F031E031E0C1EC1AZ从Feed View View View View View View View View View View View View View to View View View View to View View View to View View to View View to View View to View View to View Z594C13F2C6EB0C3D59F2C38ABC38ABC38ABC38ABNABC38BAB CAB。

Is there any way for me to sustain the blurred Feed view as the background of the Search view controller?我有什么办法可以维持模糊的 Feed 视图作为搜索视图 controller 的背景? Thanks in advance.提前致谢。

UPDATE: After trying this out on a simple separate Xcode project, it seems that the issue specifically occurs with the Show/Push segue (once again, made via storyboard) but does not with the other segue styles.更新:在一个简单的单独 Xcode 项目上尝试此操作后,似乎该问题特别发生在 Show/Push segue(再次,通过情节提要),但与其他 segue styles 无关。 Is there a workaround to this?有解决方法吗?

Simplified project storyboard简化项目 storyboard

Simplified project blurred background issue GIF简化项目背景模糊问题 GIF

In my case, I would present search VC, on click of search button action, instead of pushing using a separate navigation controller.就我而言,我会在单击搜索按钮操作时显示搜索 VC,而不是使用单独的导航 controller 推送。 This could help avoid the hierarchy conflict that you are facing currently.这可以帮助避免您当前面临的层次结构冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM