         } else {
             searchController.searchBar.scopeButtonTitles = nil
         }
-        if #available(iOS 11.0, *) {
-            navigationItem.hidesSearchBarWhenScrolling = true
-        }
     }
     
     override func viewDidLoad() {

            navigationItem.searchController = searchController
            navigationController?.navigationBar.prefersLargeTitles = true
            navigationItem.largeTitleDisplayMode = .automatic
            navigationItem.hidesSearchBarWhenScrolling = true
        } else {
            // Fallback on earlier versions
            tableView.contentInset = UIEdgeInsetsMake(56, 0, 0, 0)

        super.viewWillAppear(animated)
        if let path = tableView.indexPathForSelectedRow {
            tableView.deselectRow(at: path, animated: false)
        }
    }
    
