Latest1.4.3
Homepagehttps://github.com/Blackjacx/SHSearchBar
LicenseMIT
Platformsios 9.0
Authors

SHSearchBar

Build Status
Version
Xcode 9.0+iOS 9.0+Swift 4.0+License
Codecov
Codebeat
Downloads
Donate

The clean and shiny search bar that does what UISearchBar does only with dirty
hacks. This view is designed to tackle the customization limits of UISearchBar.
The difference here is that this class does not inherit UISearchBar but
composes a new UIView object by using a UITextField that is much easier to use.
These are the limits of the UISearchBar:

  • no clean way to left align the placeholder
  • the cancel button is hard to taylor to your needs
  • generally the appearance is not customizable (e.g. the font of the text)
  • there are some strange behaviours when you set a custom background image

Since I use a UITextField these restrictions do not apply.

Installation

SHSearchBar is compatible with iOS 9 or higher and builds with Xcode 9
and Swift 4 syntax. It is available through CocoaPods.
To install it, simply add the following line to your Podfile:

pod "SHSearchBar"

Examples

The repo includes an example project. It shows shows different use cases of
the searchbar. To run it, just type pod try SHSearchBar in your console and
it will be cloned and opened for you. The following images show some of these
use cases:

Contribution

  • If you found a bug, open an issue
  • If you have a feature request, open an issue
  • If you want to contribute, submit a pull request

Author

Stefan Herold, [email protected]

License

SHSearchBar is available under the MIT license. See the LICENSE file for more
info.

Latest podspec

{
    "name": "SHSearchBar",
    "version": "1.4.3",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "The search bar that does not suck.",
    "description": "The clean and shiny search bar that does what UISearchBar does only with dirty hacks. This search bar class is designed to overcome the customization limits of UISearchBar. The difference here is that this class does not inherit UISearchBar but composes a new UIView object by using a UITextField that is much easier to use.",
    "homepage": "https://github.com/Blackjacx/SHSearchBar",
    "social_media_url": "https://twitter.com/Blackjacxxx",
    "authors": {
        "Stefan Herold": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Blackjacx/SHSearchBar.git",
        "tag": "1.4.3"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SHSearchBar/Classes/**/*",
    "resource_bundles": {
        "SHSearchBar": [
            "SHSearchBar/Strings/*.lproj/*.strings"
        ]
    }
}

Pin It on Pinterest

Share This