 
 import UIKit
 
-class MasterViewController: UITableViewController, UISearchResultsUpdating,UISearchBarDelegate, NpmDataSourceDelegate {
+class MasterViewController: UITableViewController, UISearchControllerDelegate, UISearchResultsUpdating, UISearchBarDelegate, NpmDataSourceDelegate {
 
     var detailViewController: DetailViewController? = nil
     var objects = NSArray()

             self.performSegueWithIdentifier("showDetail", sender: nil)
        }
    }

    func updateSearchResultsForSearchController(searchController: UISearchController)
    {

        
        self.resultSearchController = ({
            let controller = UISearchController(searchResultsController: nil)
            controller.delegate = self
            controller.searchResultsUpdater = self
            controller.dimsBackgroundDuringPresentation = false
            controller.searchBar.delegate = self
