RealmSearchViewController
class RealmSearchViewController: UITableViewController,
RealmSearchResultsDataSource,
RealmSearchResultsDelegate
extension RealmSearchViewController: UISearchResultsUpdating
Base class for displaying searchable Realm object lists
-
Realm entity name to display
Declaration
Swift
@IBInspectable var entityName: String? { get set }
-
Key path to search property
Declaration
Swift
@IBInspectable var searchPropertyKeyPath: String? { get set }
-
Base predicate to add to search
Declaration
Swift
var basePredicate: NSPredicate? { get set }
-
Sort property key
Declaration
Swift
@IBInspectable var sortPropertyKey: String? { get set }
-
Sort order ascending or descending
Declaration
Swift
@IBInspectable var sortAscending: Bool { get set }
-
Enable search bar?
Declaration
Swift
@IBInspectable var searchBarInTableView: Bool
-
Case insensitive search?
Declaration
Swift
@IBInspectable var caseInsensitiveSearch: Bool { get set }
-
Containment search?
Declaration
Swift
@IBInspectable var useContainsSearch: Bool { get set }
-
Default initializer
Declaration
Swift
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
Parameters
nibNameOrNil
Nib name (optional)
nibBundleOrNil
Nib bundle (optional
-
Style initializer
Declaration
Swift
override init(style: UITableView.Style)
Parameters
style
Table style
-
Cell for Object
Declaration
Swift
func searchViewController(_ controller: RealmSearchViewController, cellForObject object: Object, atIndexPath indexPath: IndexPath) -> UITableViewCell
Parameters
controller
RealmSearchViewController
object
Realm Object
indexPath
Index path
Return Value
Cell
-
Did select Object
Declaration
Swift
func searchViewController(_ controller: RealmSearchViewController, didSelectObject anObject: Object, atIndexPath indexPath: IndexPath)
Parameters
controller
RealmSearchViewController
object
Realm Object
indexPath
Index path
-
Will select Object
Declaration
Swift
func searchViewController(_ controller: RealmSearchViewController, willSelectObject anObject: Object, atIndexPath indexPath: IndexPath)
Parameters
controller
RealmSearchViewController
object
Realm Object
indexPath
Index path
-
Will Select Row AT
Declaration
Swift
override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath?
Parameters
tableView
UITableView
indexPath
Index path
Return Value
selectable path
-
Will Select Row AT
Declaration
Swift
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
Parameters
tableView
UITableView
indexPath
Index path
Return Value
selectable path
-
Create table cell
Declaration
Swift
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
Parameters
tableView
UITableView
indexPath
Index Path
Return Value
UITableViewCell
-
Update search results
Declaration
Swift
func updateSearchResults(for searchController: UISearchController)
Parameters
searchController
UISearchController