Inherits from UITableViewController
Conforms to UISearchBarDelegate
UITableViewDataSource
UITableViewDelegate
Declared in SearchViewController.h
SearchViewController.m

Properties

choices

@property (strong, nonatomic) NSMutableArray<ChoiceModel> *choices

searchBar

@property (weak, nonatomic) IBOutlet UISearchBar *searchBar

segmentControl

@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentControl

topics

@property (strong, nonatomic) NSMutableArray<ChoiceTopicModel> *topics

user

@property (nonatomic, strong) UserModel *user

Instance Methods

didReceiveMemoryWarning

Standard iOS delegate for handling memory warnings

- (void)didReceiveMemoryWarning

Declared In

SearchViewController.m

doSearch:::

Helper method to call the Search Service

- (void)doSearch:(int)searchType :

Declared In

SearchViewController.m

numberOfSectionsInTableView:

Return number of Sections in the Collection View

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

Parameters

collectionView

this Collection View

Return Value

Return number of Sections

Declared In

SearchViewController.m

searchBarSearchButtonClicked:

Standard iOS delegate for search button handling in search bar.

- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar

Return Value

<#return value description#>

Declared In

SearchViewController.m

tableView:accessoryButtonTappedForRowWithIndexPath:

When a Disclosure Button in the Table Cell is clicked

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The Table View

indexPath

Index to the Cell in the Table View

Return Value

Return the Cell

Declared In

SearchViewController.m

tableView:cellForRowAtIndexPath:

Set the titles of the Sections

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The Table View

section

The Section in the Table View to update

Return Value

<#return value description#>

Declared In

SearchViewController.m

tableView:didSelectRowAtIndexPath:

When a Cell in the Table View is selected

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The Table View

indexPath

Index to the Cell in the Table View

Return Value

Return the Cell

Declared In

SearchViewController.m

tableView:numberOfRowsInSection:

Return number of Items in the Section of the Collection View

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

Parameters

section

Section the Section

collectionView

This Collection View

Return Value

Return the number of rows in the Collection

Declared In

SearchViewController.m

tableView:titleForHeaderInSection:

Set the titles of the Sections

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

Parameters

tableView

The Table View

section

The Section in the Table View to update

Return Value

<#return value description#>

Declared In

SearchViewController.m

touchesBegan:withEvent:

Standard iOS delegate for dismissing keyboard in text boxes.

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

Return Value

<#return value description#>

Declared In

SearchViewController.m

viewDidLoad

Load and initialize the Controller for the Search View

- (void)viewDidLoad

Declared In

SearchViewController.m

viewWillAppear:

Standard iOS delegate when this view is displayed.

- (void)viewWillAppear:(BOOL)animated

Parameters

animated

animated If animated view

Declared In

SearchViewController.m