我正在使用这个库: https ://github.com/xmartlabs/XLPagerTabStrip
我的问题是我无法解决为其中一个ButtonBarPagerTabStripViewController
子 viewController -添加 UISearchController 的问题UITableViewController
。
尝试在 iOS 11+ 下添加 searchBar 时不会出现,如下所示:
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = true
并尝试添加UISearchBar
为tableView
这样:
tableView.tableHeaderView = searchController.searchBar
然后在点击搜索字段后,整个UISearchBar
消失了。
您知道如何UISearchController
在一个孩子UITableViewController
中实施任何正确的方法吗?ButtonBarPagerTabStripViewController