简体   繁体   English

平滑的UISearchController导航栏过渡

[英]Smooth UISearchController navigation bar transition

I have a navigation controller with a root view controller that sets its titeView to a UISearchBar. 我有一个带有根视图控制器的导航控制器,该控制器将其titeView设置为UISearchBar。 Upon submitting their query, I push on another view controller which also has a UISearchBar populated with their query. 提交他们的查询后,我将推入另一个视图控制器,该控制器也具有填充了他们的查询的UISearchBar。 If possible, I would like to keep this search bar in place and just transition the view controller below it. 如果可能的话,我想将此搜索栏保持在原位,而只是将其下方的视图控制器转换。 Is this possible with a navigation controller? 导航控制器可以做到这一点吗? Or do I need to make a custom container view controller. 还是我需要制作一个自定义的容器视图控制器。

One thing you can do is create a new custom view & do transition animation to the custom view upon submitting the query. 您可以做的一件事是创建一个新的自定义视图,并在提交查询后将动画过渡到该自定义视图。 This way will keep UISearchBar stay in place. 这样可以使UISearchBar保持在原位。

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

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