[英]Multiple SearchBar in NavigationBar
I'm new in developing applications on iOS and I'm trying to add into NavigationBar 2 SearchBar. 我是在iOS上开发应用程序的新手,正尝试将其添加到NavigationBar 2 SearchBar中。 One SearchBar is simple to add with:
一个SearchBar易于添加:
searchController.searchBar.sizeToFit()
navigationItem.titleView = searchController.searchBar
but I don't know how can add 2 searchbar in navigationbar. 但我不知道如何在导航栏中添加2个搜索栏。
I would like to look like this: 我想看起来像这样:
I don't think there is any way to add multiple search bars in Navigation Bar. 我认为没有任何方法可以在导航栏中添加多个搜索栏。 The best solution that I can suggest you according to your designs given above is to add two UITextFields or two UISearchBars in your ViewController and not in your Navigation Bar.
根据上面给出的设计,我建议您的最佳解决方案是在ViewController中而不是在导航栏中添加两个UITextField或两个UISearchBar。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.