RBSearchContainerView Class Reference

Inherits from UIView
Declared in RBSearchContainerView.h

Overview

A container view providing a search bar at the top and a transition to a search view.

  searchBarView

The search bar view.

@property (nonatomic, readonly, nonnull) RBSearchBarView *searchBarView

Declared In

RBSearchContainerView.h

  bodyView

The body view, when search mode is closed.

@property (nonatomic, nullable) UIView *bodyView

Declared In

RBSearchContainerView.h

  resultView

The search results view, when the search mode is opened.

@property (nonatomic, nullable) UIView *resultView

Declared In

RBSearchContainerView.h

  liveSearchEnabled

Whether or not search results should be updated while the user is typing.

@property (nonatomic) BOOL liveSearchEnabled

Declared In

RBSearchContainerView.h

  delegate

The delegate that receives search and state transition events.

@property (nonatomic, weak, nullable) id<RBSearchContainerViewDelegate> delegate

Declared In

RBSearchContainerView.h

  animator

The RBAnimator object to use when animating transitions.

@property (nonatomic, readonly, nonnull) RBAnimator *animator

Declared In

RBSearchContainerView.h

  inSearchMode

Whether or not search mode is currently activated.

@property (nonatomic, readonly) BOOL inSearchMode

Declared In

RBSearchContainerView.h

– openSearchWithAnimation:openKeyboard:completion:

Opens search mode, presenting the resultView and optionally opening the search query field for editing.

- (void)openSearchWithAnimation:(BOOL)animated openKeyboard:(BOOL)openKeyboard completion:(nullable dispatch_block_t)completion

Parameters

animated

Whether or not the transition should be animated.

openKeyboard

Whether or not to open the keyboard for editing the search query field.

completion

An optional block to be called when the transition is complete.

Declared In

RBSearchContainerView.h

– closeSearchWithAnimation:completion:

Closes search mode, presenting the bodyView again and closing the keyboard if necessary.

- (void)closeSearchWithAnimation:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

animated

Whether or not the transition should be animated.

completion

An optional block to be called when the transition is complete.

Declared In

RBSearchContainerView.h

  lastQueryString

The last query string that was searched.

@property (nonatomic, readonly, nullable) NSString *lastQueryString

Declared In

RBSearchContainerView.h

  queryString

The current query string as it appears in the text field.

@property (nonatomic, nullable) NSString *queryString

Declared In

RBSearchContainerView.h

– performSearchWithQuery:

Performs a search with the given query. The query is assigned to lastQueryString. The delegate is notified that the search has been requested.

- (void)performSearchWithQuery:(nonnull NSString *)queryString

Parameters

queryString

The query string to search with.

Declared In

RBSearchContainerView.h

– openKeyboardWithCompletion:

Opens the keyboard for editing the search query string.

- (void)openKeyboardWithCompletion:(nullable dispatch_block_t)completion

Parameters

completion

An optional block to be called when the keyboard has been opened.

Declared In

RBSearchContainerView.h

– closeKeyboardWithCompletion:

Closes the keyboard for editing the search query string.

- (void)closeKeyboardWithCompletion:(nullable dispatch_block_t)completion

Parameters

completion

An optional block to be called when the keyboard has been closed.

Declared In

RBSearchContainerView.h