Class: UISearchDisplayController

Inherits:
NSObject show all

Overview

A search display controller manages display of a search bar and a table view that displays the results of a search of data managed by another view controller.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Boolean) active

The visibility state of the search interface. The default value is NO.If you set this value directly, any change is performed without animation. Use setActive:animated: if a change in state should be animated.When the user focus in the search field of a managed search bar, the search display controller automatically displays the search interface. You can use this property to force the search interface to appear.

Returns:

  • (Boolean)

- (Object) delegate

The controller’s delegate.

Returns:

- (UISearchBar) searchBar (readonly)

The search bar. (read-only)

Returns:

- (UIViewController) searchContentsController (readonly)

The view controller that manages the contents being searched. (read-only) This is typically an instance of UITableViewController.

Returns:

- (Object) searchResultsDataSource

The data source for the table view in which the search results are displayed. The default is nil.

Returns:

- (Object) searchResultsDelegate

The delegate for the table view in which the search results are displayed. The default is nil.

Returns:

- (UITableView) searchResultsTableView (readonly)

The table view in which the search results are displayed. (read-only) This method creates a new table view if one does not already exist.

Returns:

- (String) searchResultsTitle

The title for the search results view. The default value is nil.If the value is nil, the controller uses the default title string.

Returns:

Instance Method Details

- (Object) initWithSearchBar(searchBar, contentsController:viewController)

Returns a display controller initialized with the given search bar and contents controller.

Parameters:

  • searchBar (UISearchBar)

    A search bar.The search bar must not currently be associated with another search display controller.

  • viewController (UIViewController)

    The view controller that manages display of the original contents that are to be searched.The view controller must not currently be associated with another search display controller.

Returns:

  • (Object)

    A display controller initialized with the given search bar and contents controller.

- (Object) setActive(visible, animated:animated)

Displays or hides the search interface, optionally with animation. When the user focus in the search field of a managed search bar, the search display controller automatically displays the search interface. You can use this method to force the search interface to appear.

Parameters:

  • visible (Boolean)

    YES to display the search interface if it is not already displayed; NO to hide the search interface if it is currently displayed.

  • animated; (Boolean)

    YES to use animation for a change in visible state, otherwise NO.

Returns: