diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index c58e8b10e..e04149e18 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -46,7 +46,6 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner searchController.obscuresBackgroundDuringPresentation = false searchController.searchBar.delegate = self searchController.searchBar.placeholder = NSLocalizedString("Search Articles", comment: "Search Articles") - searchController.searchBar.showsScopeBar = true searchController.searchBar.scopeButtonTitles = [ NSLocalizedString("Here", comment: "Here"), NSLocalizedString("All Articles", comment: "All Articles") @@ -427,6 +426,16 @@ extension MasterTimelineViewController: UISearchBarDelegate { coordinator.searchArticles(searchBar.text!, searchScope) } + func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool { + searchBar.showsScopeBar = true + return true + } + + func searchBarShouldEndEditing(_ searchBar: UISearchBar) -> Bool { + searchBar.showsScopeBar = false + return true + } + } // MARK: Private