Blackjacx/SHSearchBar
The search bar that doesn't suck.
Installation
Swift Package Manager
In Xcode open your target list and select your project. Click the tab Swift Packages and there the small + icon. Enter the URL of this repository, select the version you want to install - usually the preset is okay - and confirm.
CocoaPods
Since SHSearchBar uses localized resources I dropped CocoaPods support in favor of SPM from version 2.0.0. Please integrate the package via SPM (see above).
Carthage
Since SHSearchBar uses localized resources I dropped Carthage support in favor of SPM from version 2.0.0. Please integrate the package via SPM (see above).
Examples
The repo includes an example project. It shows shows different use cases of the search bar. To run it, just open and run ./Example/SHSearchBarExample.xcodeproj. The following images show some use cases:
<p align="center"> <caption align="center">You can show a custom placeholder like for normal text fields:</caption><br /> <img src="./.github/assets/example_01.png" alt="Placeholder"> </p>
<p align="center"> <caption align="center">And you can even type text into that searchbar:</caption><br /> <img src="./.github/assets/example_02.png" alt="Text"> </p>
<p align="center"> <caption align="center">Wow there are customizable accessory views too:</caption><br /> <img src="./.github/assets/example_03.png" alt="Accesssory Icon"> </p>
<p align="center"> <caption align="center">Easily customize text and cancel button as you want:</caption><br /> <img src="./.github/assets/example_04.png" alt="Customizable text and ancel button"> </p>
<p align="center"> <caption align="center">You can customize each corner radius of the text field so that layouts like this become an ease:</caption><br /> <img src="./.github/assets/example_06.png" alt="Corner Radius Customization"> </p>
<p align="center"> <caption align="center">The inner text field supports the new iOS 10 'textContentMode':<br />(Re-uses the address searched in Apple Maps before)</caption><br /> <img src="./.github/assets/example_05.png" alt="UITextContentMode Support"> </p>
<p align="center"> <caption align="center">You can use the search bar inside a UINavigationBar:</caption><br /> <img src="./.github/assets/example_07.png" alt="UINavigationBar Support"> </p>
Code Documentation
The code documentation is generated and hosted by Swift Package Index (powered by DocC)
Release
To release this Swift package the following steps have to be taken:
- Create a new branch
release-x.y.z - Run
bash <(curl -H -s https://raw.githubusercontent.com/Blackjacx/Scripts/master/frameworks/bootstrap.sh)to update to the latest shared development files - Run
bundle updateto update all Ruby gems - Commit all changes, make a PR and merge it to develop
- Run
bundle exec fastlane release framework:"SHSearchBar" version:"x.y.z"to release the new version - Post the following on Twitter
SHSearchBar release x.y.z π
βΈ π SHSearchBar (x.y.z) successfully published
βΈ π
September 2nd
βΈ π https://swiftpackageindex.com/Blackjacx/SHSearchBar
βΈ π https://github.com/Blackjacx/SHSearchBar/releases/latest
βΈ π Tell your friends!
#spm #search #ios #apple #xcode #uisearchbar #swiftpackagemanagerContribution
- If you found a bug, please open an issue.
- If you have a feature request, please open an issue.
- If you want to contribute, please submit a pull request.
Contributors
Thanks to all of you who are part of this:
<a href="https://github.com/blackjacx/SHSearchBar/graphs/contributors"> <img src="https://contrib.rocks/image?repo=blackjacx/SHSearchBar" /> </a>
License
SHSearchBar is available under the MIT license. See the LICENSE file for more info.
Package Metadata
Repository: Blackjacx/SHSearchBar
Stars: 256
Forks: 31
Open issues: 18
Default branch: develop
Primary language: swift
License: MIT
Topics: apple, carthage, carthage-support, cocoapods, hacktoberfest, ios, search, spm, swiftpackagemanager, uisearchbar, xcode
README: README.md