我正在向我的导航栏添加搜索栏
searchBar.showsCancelButton = false
searchBar.placeholder = "Search"
searchBar.delegate = self
searchBar.enablesReturnKeyAutomatically = true
self.navigationItem.titleView = searchBar
但是我有条形按钮项目有一种方法可以隐藏它并使searchBar全长