             }
         }
     }
-    
+
     private func data() -> [Object] {
         if filteredObjects.isNonEmpty {
             return filteredObjects

        filteredProperties = properties
        filteredObjects = []
        super.init(nibName: nil, bundle: nil)
        
        title = "Objects"
        let bbi = UIBarButtonItem(title: "Select", style: .plain, target: self, action: .edit)
        navigationItem.rightBarButtonItem = bbi
        let bbiPreview = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: .togglePreview)
        navigationItem.rightBarButtonItems = [bbi, bbiPreview]
        
    }
    
    public override func loadView() {
        view = realmView
    }
    
    public override func viewDidLoad() {
        super.viewDidLoad()
        configureTableView()
        setupSearch()
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        realmView.tableView.reloadData()
    }
    
    public required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func configureTableView() {
        realmView.tableView.delegate = self
        realmView.tableView.dataSource = self
        realmView.tableView.tableFooterView = UIView()
        realmView.tableView.register(RBSRealmObjectBrowserCell.self, forCellReuseIdentifier: cellIdentifier)
    }
    
    public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
        super.traitCollectionDidChange(previousTraitCollection)
        if #available(iOS 9.0, *) {

            }
        }
    }

    func updateSearchResults(for searchController: UISearchController) {
        searchForText(searchController.searchBar.text)
        if filteredObjects.isNonEmpty {
            realmView.tableView.reloadData()
        }
    }

    private func searchForText(_ searchText: String?) {
        if let searchText = searchText {
            if searchText.isNonEmpty {
