Home

Awesome

<img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/logo.png" height="200">

<br/><br/> Apps Using Total Downloads <br> Build Status Pod Version Pod Platform Pod License

QQ chat room

 <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/QQChatRoomForPYSearch.jpg" width="200">

Features

Requirements

Architecture

Main

Category

Contents

<a id="Renderings"></a>Renderings

<img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/PYSearchDemo.gif" width="375">

<a id="Styles"></a>Styles

Hot search style

<img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle01.png" width="375"> <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle02.png" width="375"><br><img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle03.png" width="375"> <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle04.png" width="375"><br><img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle05.png" width="375"> <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle06.png" width="375">

Search history style

<img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle01.png" width="375"> <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle02.png" width="375"><br><img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle03.png" width="375"> <img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle04.png" width="375"><br><img src="https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle05.png" width="375">

<a id="Howtouse"></a>How to use

<a id="Details"></a>Details (See the example program PYSearchExample for details)

    // 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];

<a id="Custom"></a>Custom

// 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;

<a id="Hope"></a>Hope

Licenses

All source code is licensed under the MIT License.