Fix issue where search bar sometimes wouldn't appear.

This commit is contained in:
Maurice Parker 2019-11-02 11:49:44 -05:00
parent 721752a16b
commit 6a0c5ac31b
1 changed files with 1 additions and 7 deletions

View File

@ -57,6 +57,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
NSLocalizedString("Here", comment: "Here"),
NSLocalizedString("All Articles", comment: "All Articles")
]
navigationItem.searchController = searchController
definesPresentationContext = true
// Configure the table
@ -73,13 +74,6 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
super.viewWillAppear(animated)
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
// You have to assign the search controller here to avoid showing it by default
// https://stackoverflow.com/questions/57581557/how-to-initally-hide-searchbar-in-navigation-controller-on-ios-13
navigationItem.searchController = searchController
}
// MARK: Actions
@IBAction func markAllAsRead(_ sender: Any) {