FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
UIAResultDisplayController Class Reference

A result display controller manages display of a input view and a result view that displays the results of a search of data by view insertion. This is working as a general version of UISearchDisplayController. More...

#import <UIAResultDisplayController.h>

Inheritance diagram for UIAResultDisplayController:
<UIADimmingViewDelegate>

Instance Methods

(instancetype) - initWithContentsController:
 Returns a display controller initialized with the given contents controller. More...
 
(void) - reloadResult
 Request to reload result view. More...
 
(void) - setActive:animated:
 Displays or hides the result interface, optionally with animation. More...
 
- Instance Methods inherited from <UIADimmingViewDelegate>
(void) - dimmingViewDidCancel:
 Tells the delegate that the dimming view has been touched. More...
 

Properties

IBOutlet id
< UIAResultDisplayDelegate
delegate
 The controller's delegate. More...
 
IBOutlet UIADimmingViewdimmingView
 The controller's dimming view. More...
 
BOOL active
 The visibility state of the search interface. More...
 
IBOutlet UIViewController * contentsController
 The view controller that manages the contents being searched. (read-only) More...
 
IBOutlet UIView * inputView
 The input view. More...
 
IBOutlet UIView * resultView
 The result view. More...
 
unsigned int visible:1
 

Detailed Description

A result display controller manages display of a input view and a result view that displays the results of a search of data by view insertion. This is working as a general version of UISearchDisplayController.

You initialize a search display controller with a view controller responsible for managing the input view. When reloading is requested, the result display controller is responsible for superimposing the result interface over the original view controller’s view and showing the result view. The results are fully custumizable through delegate. The delegate conforms to the UIAResultDisplayDelegate protocol. It is a wrapped interface to simplify output from raw inputs. Note that inputView should be subview of contentsViewController.view. And the contentsViewController's implementation should not depend on its view order. This controller will insert and remove others views to below and above of the inputView.

Method Documentation

- (instancetype) initWithContentsController: (UIViewController *)  viewController

Returns a display controller initialized with the given contents controller.

Parameters
viewControllerThe view controller that manages display of the original contents. The view of view controller must have inputView as its top level subview.
- (void) reloadResult

Request to reload result view.

Call whenever any change is found in input. Its specific behavior is determined by delegate.

- (void) setActive: (BOOL)  visible
animated: (BOOL)  animated 

Displays or hides the result interface, optionally with animation.

Parameters
visibleYES to display the result interface if it is not already displayed; NO to hide the result interface if it is currently displayed.
animatedYES to use animation for a change in visible state, otherwise NO.
See also
active

Member Data Documentation

- (unsigned int) animating
protected
- (unsigned int) delegateDidHideSearchResultView
protected
- (unsigned int) delegateDidShowSearchResultView
protected
- (unsigned int) delegateReloadResultView
protected
- (unsigned int) delegateShouldReloadResultView
protected
- (unsigned int) delegateShouldShowDimmingView
protected
- (unsigned int) delegateWillHideSearchResultView
protected
- (unsigned int) delegateWillShowSearchResultView
protected
- (unsigned int) hidNavigationBar
protected
- (unsigned int) navigationBarHidingEnabled
protected
- (unsigned int) resultViewLoaded
protected

Property Documentation

- (BOOL) active
readwritenonatomicassign

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 controller receive a message reloadResult, the result display controller automatically displays the search interface. You can use this property to force the search interface to appear.

- (IBOutlet UIViewController*) contentsController
readnonatomicassign

The view controller that manages the contents being searched. (read-only)

The view controller must contain input view as one of its subviews.

- (IBOutlet id<UIAResultDisplayDelegate>) delegate
readwritenonatomicweak

The controller's delegate.

- (IBOutlet UIADimmingView*) dimmingView
readwritenonatomicstrong

The controller's dimming view.

If nil, new one will be created.

- (IBOutlet UIView*) inputView
readwritenonatomicweak

The input view.

When active becomes YES, the input view must not be nil. And it must should keep identical view unless active becomes NO.

- (IBOutlet UIView*) resultView
readwritenonatomicstrong

The result view.

When active becomes YES, if the result view is nil, controller sends resultDisplayControllerLoadResultView: message to delegate. If the view is nil and delegate doesn't implement the message, controller raise an exception.

- (unsigned int) visible
atomicprotected

The documentation for this class was generated from the following file: