Rollback change that caused the search to not appear. Issue #1199
This commit is contained in:
parent
66b6d43408
commit
cee1d5dc4d
@ -47,6 +47,19 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange), name: .DisplayNameDidChange, object: nil)
|
||||
|
||||
// Setup the Search Controller
|
||||
searchController.delegate = self
|
||||
searchController.searchResultsUpdater = self
|
||||
searchController.obscuresBackgroundDuringPresentation = false
|
||||
searchController.searchBar.delegate = self
|
||||
searchController.searchBar.placeholder = NSLocalizedString("Search Articles", comment: "Search Articles")
|
||||
searchController.searchBar.scopeButtonTitles = [
|
||||
NSLocalizedString("Here", comment: "Here"),
|
||||
NSLocalizedString("All Articles", comment: "All Articles")
|
||||
]
|
||||
navigationItem.searchController = searchController
|
||||
definesPresentationContext = true
|
||||
|
||||
// Configure the table
|
||||
tableView.dataSource = dataSource
|
||||
numberOfTextLines = AppDefaults.timelineNumberOfLines
|
||||
@ -61,21 +74,6 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func viewWillLayoutSubviews() {
|
||||
// If you setup the Search Controller in viewWillLayoutSubviews it won't show by default on creation
|
||||
searchController.delegate = self
|
||||
searchController.searchResultsUpdater = self
|
||||
searchController.obscuresBackgroundDuringPresentation = false
|
||||
searchController.searchBar.delegate = self
|
||||
searchController.searchBar.placeholder = NSLocalizedString("Search Articles", comment: "Search Articles")
|
||||
searchController.searchBar.scopeButtonTitles = [
|
||||
NSLocalizedString("Here", comment: "Here"),
|
||||
NSLocalizedString("All Articles", comment: "All Articles")
|
||||
]
|
||||
navigationItem.searchController = searchController
|
||||
definesPresentationContext = true
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
@IBAction func markAllAsRead(_ sender: Any) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user