
PYSearchPYSearchConstPYSearchViewControllerPYSearchSuggestionViewControllerUIColor+PYSearchExtensionUIView+PYSearchExtensionNSBundle+PYSearchExtensionGetting Started
Usage






pod "PYSearch"#import <PYSearch.h>PYSearch folder to project#import "PYSearch.h" // 1. Create hotSearches array NSArray *hotSeaches = @[@"Java", @"Python", @"Objective-C", @"Swift", @"C", @"C++", @"PHP", @"C#", @"Perl", @"Go", @"Javascript", @"R", @"Ruby", @"MATLAB"]; // 2. Create searchViewController PYSearchViewController *searchViewCOntroller= [PYSearchViewController searchViewControllerWithHotSearches:hotSeaches searchBarPlaceholder:@"Search programming language" didSearchBlock:^(PYSearchViewController *searchViewController, UISearchBar *searchBar, NSString *searchText) { // Call this Block when completion search automatically // Such as: Push to a view controller [searchViewController.navigationController pushViewController:[[UIViewController alloc] init] animated:YES]; }]; // 3. present the searchViewController UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:searchViewController]; [self presentViewController:nav animated:NO completion:nil]; // 1. Set dataSource searchViewController.dataSource = self; // 2. Implement dataSource method // 1. Set searchResultShowMode searchViewController.searchResultShowMode = PYSearchResultShowModeEmbed; // 2. Set searchResultController searchViewController.searchResultCOntroller= [[UIViewController alloc] init]; // Set hotSearchStyle searchViewController.hotSearchStyle = PYHotSearchStyleColorfulTag; // Set searchHistoryStyle searchViewController.searchHistoryStyle = PYSearchHistoryStyleBorderTag; // Set searchHistoriesCachePath searchViewController.searchHistoriesCachePath = @"The cache path"; // Set searchHistoriesCount searchViewController. searchHistoriesCount = 6; // Set searchResultShowMode searchViewController.searchResultShowMode = PYSearchResultShowModeEmbed; // Set searchSuggestionHidden searchViewController.searchSuggestiOnHidden= YES; All source code is licensed under the MIT License.