I want to have search functionality similar to that of the instagram app. When editing begins in the search bar push a view controller and have the search bar filter that controller. However when I push a view controller, the navigation bar the search bar goes away and a back button is shown along with the new view.
Is it possible to
- push the view controller from the bottom of the screen
- keep the search bar from disappearing
Here's my func searchBarTextDidBeginEditing
func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
let layout = UICollectionViewFlowLayout()
let resultsController = ResultsController(collectionViewLayout: layout)
navigationController?.pushViewController(resultsController, animated: true)
}