{"id":15026852,"url":"https://github.com/ko1o/pysearch","last_synced_at":"2025-10-20T02:06:24.402Z","repository":{"id":43642575,"uuid":"71687577","full_name":"ko1o/PYSearch","owner":"ko1o","description":"🔍 An elegant search controller which replaces the UISearchController for iOS (iPhone \u0026 iPad) .","archived":false,"fork":false,"pushed_at":"2020-09-30T01:35:57.000Z","size":702,"stargazers_count":3829,"open_issues_count":99,"forks_count":753,"subscribers_count":89,"default_branch":"master","last_synced_at":"2024-10-29T15:28:55.709Z","etag":null,"topics":["cocoapods","ios","objective-c","pod","search","swift","ui"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ko1o.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2016-10-23T07:11:26.000Z","updated_at":"2024-10-12T12:14:54.000Z","dependencies_parsed_at":"2022-08-12T10:30:57.235Z","dependency_job_id":null,"html_url":"https://github.com/ko1o/PYSearch","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1o%2FPYSearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1o%2FPYSearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1o%2FPYSearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko1o%2FPYSearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ko1o","download_url":"https://codeload.github.com/ko1o/PYSearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688529,"owners_count":21145764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","ios","objective-c","pod","search","swift","ui"],"created_at":"2024-09-24T20:05:14.605Z","updated_at":"2025-10-20T02:06:24.345Z","avatar_url":"https://github.com/ko1o.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/logo.png\" height=\"200\"\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n[![Apps Using](https://img.shields.io/badge/Apps%20Using-%3E%203,000-00BFFF.svg?style=plastic)](https://cocoapods.org/pods/PYSearch)\n[![Total Downloads](https://img.shields.io/badge/Total%20Downloads-%3E%2060,000-00BFFF.svg?style=plastic)](https://cocoapods.org/pods/PYSearch)\n\u003cbr\u003e\n[![Build Status](https://travis-ci.org/ko1o/PYSearch.svg?branch=master)](https://travis-ci.org/ko1o/PYSearch)\n[![Pod Version](http://img.shields.io/cocoapods/v/PYSearch.svg?style=flat)](http://cocoadocs.org/docsets/PYSearch/)\n[![Pod Platform](https://img.shields.io/badge/platform-iOS%207%2B-blue.svg?style=flat)](http://cocoadocs.org/docsets/PYSearch/)\n[![Pod License](http://img.shields.io/cocoapods/l/PYSearch.svg?style=flat)](https://opensource.org/licenses/MIT)\n\n- 🔍 An elegant search controller for iOS.\n\n## QQ chat room\n \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/QQChatRoomForPYSearch.jpg\" width=\"200\"\u003e\n\n## Features\n- [x] Support a variety of hot search style\n- [x] Support a variety of search history style\n- [x] Support a variety of search results display mode\n- [x] Support a variety of search view controller display mode\n- [x] Support search suggestions\n- [x] Support search history (record) cache\n- [x] Support callback using delegate or block completion search\n- [x] Support CocoaPods\n- [x] Support localization\n- [x] Support vertical and horizontal screen on iPhone and iPad\n\n## Requirements\n* iOS 7.0 or later\n* Xcode 7.0 or later\n\n## Architecture\n### Main\n- `PYSearch`\n- `PYSearchConst`\n- `PYSearchViewController`\n- `PYSearchSuggestionViewController`\n\n### Category\n- `UIColor+PYSearchExtension`\n- `UIView+PYSearchExtension`\n- `NSBundle+PYSearchExtension`\n\n## Contents\n* Getting Started\n  * [Renderings](#Renderings)\n  * [Styles](#Styles)\n  \n* Usage\n  * [How to use](#Howtouse)\n  * [Details (See the example program PYSearchExample for details)](#Details)\n  * [Custom](#Custom)\n  \n* [Hope](#Hope)\n\n## \u003ca id=\"Renderings\"\u003e\u003c/a\u003eRenderings\n\n\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/PYSearchDemo.gif\" width=\"375\"\u003e \n\n## \u003ca id=\"Styles\"\u003e\u003c/a\u003eStyles\n\n#### Hot search style\n\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle01.png\" width=\"375\"\u003e \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle02.png\" width=\"375\"\u003e\u003cbr\u003e\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle03.png\" width=\"375\"\u003e \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle04.png\" width=\"375\"\u003e\u003cbr\u003e\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle05.png\" width=\"375\"\u003e \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/hotSearchStyle06.png\" width=\"375\"\u003e \n\n#### Search history style\n\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle01.png\" width=\"375\"\u003e \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle02.png\" width=\"375\"\u003e\u003cbr\u003e\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle03.png\" width=\"375\"\u003e \u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle04.png\" width=\"375\"\u003e\u003cbr\u003e\u003cimg src=\"https://github.com/iphone5solo/learngit/raw/master/imagesForPYSearch/searchHistoryStyle05.png\" width=\"375\"\u003e\n\n## \u003ca id=\"Howtouse\"\u003e\u003c/a\u003eHow to use\n* Use CocoaPods:\n  - `pod \"PYSearch\"`\n  - Import the main file：`#import \u003cPYSearch.h\u003e`\n* Manual import：\n  - Drag All files in the `PYSearch` folder to project\n  - Import the main file：`#import \"PYSearch.h\"`\n  \n  \n## \u003ca id=\"Details\"\u003e\u003c/a\u003eDetails (See the example program PYSearchExample for details)\n```objc\n    // 1. Create hotSearches array\n    NSArray *hotSeaches = @[@\"Java\", @\"Python\", @\"Objective-C\", @\"Swift\", @\"C\", @\"C++\", @\"PHP\", @\"C#\", @\"Perl\", @\"Go\", @\"JavaScript\", @\"R\", @\"Ruby\", @\"MATLAB\"];\n    // 2. Create searchViewController\n    PYSearchViewController *searchViewController = [PYSearchViewController searchViewControllerWithHotSearches:hotSeaches searchBarPlaceholder:@\"Search programming language\" didSearchBlock:^(PYSearchViewController *searchViewController, UISearchBar *searchBar, NSString *searchText) {\n        // Call this Block when completion search automatically\n        // Such as: Push to a view controller\n        [searchViewController.navigationController pushViewController:[[UIViewController alloc] init] animated:YES];\n        \n    }];\n    // 3. present the searchViewController\n    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:searchViewController];\n    [self presentViewController:nav  animated:NO completion:nil];\n\n```\n\n## \u003ca id=\"Custom\"\u003e\u003c/a\u003eCustom\n\n* Custom search suggestions display\n```objc\n// 1. Set dataSource\nsearchViewController.dataSource = self;\n// 2. Implement dataSource method\n```\n\n* Custom search result dispaly\n```objc\n// 1. Set searchResultShowMode\nsearchViewController.searchResultShowMode = PYSearchResultShowModeEmbed;\n// 2. Set searchResultController \nsearchViewController.searchResultController = [[UIViewController alloc] init];\n```\n\n* Set hotSearchStyle（default is PYHotSearchStyleNormalTag）\n```objc\n// Set hotSearchStyle\nsearchViewController.hotSearchStyle = PYHotSearchStyleColorfulTag;\n```\n\n* Set searchHistoryStyle（default is PYSearchHistoryStyleCell）\n```objc\n// Set searchHistoryStyle\nsearchViewController.searchHistoryStyle = PYSearchHistoryStyleBorderTag;\n```\n\n* Set searchHistoriesCachePath（default is PYSEARCH_SEARCH_HISTORY_CACHE_PATH）\n```objc\n// Set searchHistoriesCachePath\nsearchViewController.searchHistoriesCachePath = @\"The cache path\";\n```\n\n* Set searchHistoriesCount（default is 20）\n```objc\n// Set searchHistoriesCount\nsearchViewController. searchHistoriesCount = 6;\n```\n\n* Set searchResultShowMode（default is PYSearchResultShowModeCustom）\n```objc\n// Set searchResultShowMode\nsearchViewController.searchResultShowMode = PYSearchResultShowModeEmbed;\n```\n\n* Set searchSuggestionHidden（deafult is NO）\n```objc\n// Set searchSuggestionHidden\nsearchViewController.searchSuggestionHidden = YES;\n```\n\n## \u003ca id=\"Hope\"\u003e\u003c/a\u003eHope\n\n- If you have any questions during the process or want more interfaces to customize，you can [issues me](https://github.com/iphone5solo/PYSearch/issues/new)! \n- Instead of giving me star, it is better to throw a bug to me!\n- If you want to participate in the maintenance of this project or have a good design style, welcome to pull request!\n- If you feel slightly discomfort in use, please contact me QQ:499491531 or Email:499491531@qq.com.\n- Hope to improve this project together, let it become more powerful, able to meet the needs of most users!\n\n## Licenses\nAll source code is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko1o%2Fpysearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fko1o%2Fpysearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko1o%2Fpysearch/lists"}