I have a simple UIViewController containing a UITableView and I want to hide search bar inside of navigation bar on scrolling UITableView. I found
navigationItem.hidesSearchBarWhenScrolling = true
but it does not work. Is there any way to make it work on UIViewController?