Updating fetchedResultsController for predicate set by UISearchBar
Refactored to vanilla UIViewController Rather than having the UITableView toggle between active and inactive UISearchController , I refactored to a vanilla UIViewController with a UISearchBar at the top and a UITableView directly underneath it. What I'm trying to do is toggle the fetchedResultsController between having a predicate which is set by the text in the searchBar and one that grabs everything. I found this answer, which describes a solution to a similar problem in Objective-C and served as the basis upon which I refactored my Swift project: How to filter NSFetchedResultsController