{"id":16322753,"url":"https://github.com/blackjacx/shsearchbar","last_synced_at":"2025-05-16T15:06:52.989Z","repository":{"id":58894032,"uuid":"64702373","full_name":"Blackjacx/SHSearchBar","owner":"Blackjacx","description":"The search bar that doesn't suck.","archived":false,"fork":false,"pushed_at":"2025-01-22T17:32:14.000Z","size":2160,"stargazers_count":255,"open_issues_count":14,"forks_count":32,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-05-12T22:38:52.870Z","etag":null,"topics":["apple","carthage","carthage-support","cocoapods","hacktoberfest","ios","search","spm","swiftpackagemanager","uisearchbar","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Blackjacx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-01T21:19:42.000Z","updated_at":"2025-02-07T08:10:01.000Z","dependencies_parsed_at":"2024-06-19T19:57:30.024Z","dependency_job_id":"77dfb021-3fe6-48d0-8e77-de05f76bfcce","html_url":"https://github.com/Blackjacx/SHSearchBar","commit_stats":{"total_commits":420,"total_committers":4,"mean_commits":105.0,"dds":0.06428571428571428,"last_synced_commit":"5d734d926e22904a7360abc4d7eb737cf0e08023"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackjacx%2FSHSearchBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackjacx%2FSHSearchBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackjacx%2FSHSearchBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackjacx%2FSHSearchBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blackjacx","download_url":"https://codeload.github.com/Blackjacx/SHSearchBar/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553959,"owners_count":22090417,"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":["apple","carthage","carthage-support","cocoapods","hacktoberfest","ios","search","spm","swiftpackagemanager","uisearchbar","xcode"],"created_at":"2024-10-10T22:52:21.303Z","updated_at":"2025-05-16T15:06:52.958Z","avatar_url":"https://github.com/Blackjacx.png","language":"Swift","funding_links":["https://www.paypal.me/STHEROLD"],"categories":[],"sub_categories":[],"readme":"\u003c!--\u003ca href=\"https://github.com/Blackjacx/shsearchbar/actions?query=workflow%3ACI\"\u003e\u003cimg alt=\"CI status\" src=\"https://github.com/blackjacx/shsearchbar/workflows/CI/badge.svg\" /\u003e\u003c/a\u003e--\u003e\n[![Twitter Follow](https://img.shields.io/badge/follow-%40blackjacx-1DA1F2?logo=twitter\u0026style=for-the-badge)](https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2Fblackjacx\u0026screen_name=Blackjacxxx)\n[![Twitter Follow](https://img.shields.io/badge/Follow-%40Blackjacx-1DA1F2?logo=twitter)](https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fgithub.com%2Fblackjacx\u0026screen_name=Blackjacxxx)\n[![Version](https://shields.io/github/v/release/blackjacx/shsearchbar?display_name=tag\u0026include_prereleases\u0026sort=semver)](https://github.com/Blackjacx/shsearchbar/releases)\n[![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FBlackjacx%2FSHSearchBar%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/Blackjacx/SHSearchBar)\n[![Platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FBlackjacx%2FSHSearchBar%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/Blackjacx/SHSearchBar)\n[![Codebeat](https://codebeat.co/badges/44539071-5029-4379-9d33-99dd721915c8)](https://codebeat.co/projects/github-com-blackjacx-shsearchbar)\n[![License](https://img.shields.io/github/license/blackjacx/shsearchbar.svg)](https://github.com/blackjacx/shsearchbar/blob/develop/LICENSE)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?logo=paypal\u0026style=for-the-badge)](https://www.paypal.me/STHEROLD)\n\n\u003c!-- \u003cp align=\"center\"\u003e\n\u003cimg src=\"./icon.png\" alt=\"SHSearchBar\" height=\"128\" width=\"128\"\u003e\n\u003c/p\u003e --\u003e\n\n# SHSearchBar\n\nThe clean and shiny search bar that does what UISearchBar does only with dirty \nhacks. This view is designed to tackle the customization limits of UISearchBar. \nThe difference here is that this class does not inherit UISearchBar but \ncomposes a new UIView object by using a UITextField that is much easier to use. \nThese are the limits of the UISearchBar:\n\n- no clean way to left align the placeholder\n- the cancel button is hard to tailor to your needs\n- generally the appearance is not customizable (e.g. the font of the text)\n- there are some strange behaviors when you set a custom background image\n\nSince I use a UITextField these restrictions do not apply.\n\n## Installation\n\n### [Swift Package Manager](https://swift.org/package-manager/)\n\nIn Xcode open your target list and select your project. Click the tab `Swift \nPackages` and there the small `+` icon. Enter the URL of this repository, \nselect the version you want to install - usually the preset is okay - and \nconfirm.\n\n### [CocoaPods](http://cocoapods.org)\n\nSince SHSearchBar uses localized resources I dropped CocoaPods support in favor of SPM from version `2.0.0`. \nPlease integrate the package via SPM (see above).\n\n### Carthage\n\nSince SHSearchBar uses localized resources I dropped Carthage support in favor of SPM from version `2.0.0`. \nPlease integrate the package via SPM (see above).\n\n## Examples\n\nThe repo includes an example project. It shows shows different use cases of \nthe search bar. To run it, just open and run `./Example/SHSearchBarExample.xcodeproj`. The following images show some\nuse cases:\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eYou can show a custom placeholder like for normal text fields:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_01.png\" alt=\"Placeholder\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eAnd you can even type text into that searchbar:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_02.png\" alt=\"Text\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eWow there are customizable accessory views too:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_03.png\" alt=\"Accesssory Icon\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eEasily customize text and cancel button as you want:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_04.png\" alt=\"Customizable text and ancel button\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eYou can customize each corner radius of the text field so that layouts like this become an ease:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_06.png\" alt=\"Corner Radius Customization\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eThe inner text field supports the new iOS 10 'textContentMode':\u003cbr /\u003e(Re-uses the address searched in Apple Maps before)\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_05.png\" alt=\"UITextContentMode Support\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ccaption align=\"center\"\u003eYou can use the search bar inside a UINavigationBar:\u003c/caption\u003e\u003cbr /\u003e\n\u003cimg src=\"./.github/assets/example_07.png\" alt=\"UINavigationBar Support\"\u003e\n\u003c/p\u003e\n\n## Code Documentation\n\nThe [code documentation](https://swiftpackageindex.com/Blackjacx/SHSearchBar/develop/documentation/shsearchbar) is generated and hosted by [Swift Package Index](https://swiftpackageindex.com/) (powered by [DocC](https://developer.apple.com/documentation/docc))\n\n## Release\n\nTo release this Swift package the following steps have to be taken:\n- Create a new branch `release-x.y.z`\n- Run `bash \u003c(curl -H -s https://raw.githubusercontent.com/Blackjacx/Scripts/master/frameworks/bootstrap.sh)` to update to the latest shared development files\n- Run `bundle update` to update all Ruby gems\n- Commit all changes, make a PR and merge it to develop\n- Run `bundle exec fastlane release framework:\"SHSearchBar\" version:\"x.y.z\"` to release the new version\n- Post the following on Twitter\n```\nSHSearchBar release x.y.z 🎉\n\n▸ 🚀  SHSearchBar (x.y.z) successfully published\n▸ 📅  September 2nd\n▸ 🌎  https://swiftpackageindex.com/Blackjacx/SHSearchBar\n▸ 🌎  https://github.com/Blackjacx/SHSearchBar/releases/latest\n▸ 👍  Tell your friends!\n\n#spm #search #ios #apple #xcode #uisearchbar #swiftpackagemanager\n```\n\n## Contribution\n\n- If you found a **bug**, please open an **issue**.\n- If you have a **feature request**, please open an **issue**.\n- If you want to **contribute**, please submit a **pull request**.\n\n## Author\n\n[Stefan Herold](mailto:stefan.herold@gmail.com) • 🐦 [@Blackjacxxx](https://twitter.com/Blackjacxxx)\n\n## Contributors\n\nThanks to all of you who are part of this:\n\n\u003ca href=\"https://github.com/blackjacx/SHSearchBar/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=blackjacx/SHSearchBar\" /\u003e\n\u003c/a\u003e\n\n## License\n\nSHSearchBar is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackjacx%2Fshsearchbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackjacx%2Fshsearchbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackjacx%2Fshsearchbar/lists"}