             }
         }
     }
-    
+
     private func resetData() {
         objects = []
         filteredObjects = []
         selectedObjects = []
     }
-    
+
     private func deleteObjects() {
         if selectedObjects.isNonEmpty {
             do {

            }
        }
    }
    
    private func isIncluded(for searchText: String, concerning object: Object) -> Bool {
        return object.objectSchema.properties
            .filter({ "\($0.name.lowercased()) \(String(describing: object[$0.name]).lowercased()))"
            .contains(searchText.lowercased()) }).isNonEmpty
    }
    
    func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) {
        guard let searchController = searchController else { return }
        updateSearchResults(for: searchController)
    }
    
    func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
        filteredObjects = []
    }
    
    func willPresentSearchController(_ searchController: UISearchController) {
        searchController.searchBar.textField?.textColor = .white
        UIView.animate(withDuration: 0.2) {
            searchController.searchBar.showsCancelButton = true
        }
    }
    
    func willDismissSearchController(_ searchController: UISearchController) {
        realmView.tableView.reloadData()
        UIView.animate(withDuration: 0.2) {

    private var realm: Realm
    private var selectedObjects: [Object] = []
    private var realmView = RBSRealmBrowserView()

    fileprivate var searchController : UISearchController?

    init(objects: [Object], realm: Realm) {
        self.objects = objects
        self.realm = realm
