All Projects → Blackjacx → Shsearchbar

Blackjacx / Shsearchbar

Licence: mit
The search bar that doesn't suck.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Shsearchbar

Swiftysound
SwiftySound is a simple library that lets you play sounds with a single line of code.
Stars: ✭ 995 (+383.01%)
Mutual labels:  xcode, cocoapods, carthage, spm
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+5097.09%)
Mutual labels:  xcode, cocoapods, carthage
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+647.57%)
Mutual labels:  xcode, cocoapods, carthage
Shari
Shari is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView.
Stars: ✭ 111 (-46.12%)
Mutual labels:  xcode, cocoapods, carthage
Xmlmapper
A simple way to map XML to Objects written in Swift
Stars: ✭ 90 (-56.31%)
Mutual labels:  xcode, cocoapods, carthage
Pluggableappdelegate
!! No longer supported !! A lightweight service-oriented AppDelegate for iOS, made in Swift.
Stars: ✭ 96 (-53.4%)
Mutual labels:  xcode, cocoapods, carthage
Device
Light weight tool for detecting the current device and screen size written in swift.
Stars: ✭ 1,503 (+629.61%)
Mutual labels:  xcode, cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-66.5%)
Mutual labels:  xcode, cocoapods, carthage
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-42.23%)
Mutual labels:  xcode, cocoapods, carthage
Croc
Swift emoji string parsing library
Stars: ✭ 124 (-39.81%)
Mutual labels:  xcode, cocoapods, carthage
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-36.41%)
Mutual labels:  xcode, cocoapods, carthage
Magnetic
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲
Stars: ✭ 1,252 (+507.77%)
Mutual labels:  apple, cocoapods, carthage
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+472.82%)
Mutual labels:  xcode, cocoapods, carthage
Irldocumentscanner
A drop-in Objective-C ViewController that will Automatically scan a document for you you.
Stars: ✭ 172 (-16.5%)
Mutual labels:  xcode, cocoapods, carthage
Sheeeeeeeeet
Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.
Stars: ✭ 1,177 (+471.36%)
Mutual labels:  cocoapods, carthage, spm
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+17810.68%)
Mutual labels:  xcode, cocoapods, carthage
Color
Color utilities for macOS, iOS, tvOS, and watchOS
Stars: ✭ 145 (-29.61%)
Mutual labels:  cocoapods, carthage, spm
Luautocompleteview
Highly configurable autocomplete view that is attachable to any UITextField
Stars: ✭ 55 (-73.3%)
Mutual labels:  xcode, cocoapods, carthage
Cluster
Easy Map Annotation Clustering 📍
Stars: ✭ 1,132 (+449.51%)
Mutual labels:  apple, cocoapods, carthage
Microfeatures Example
📦📱 Example of iOS app built using the uFeatures architecture
Stars: ✭ 112 (-45.63%)
Mutual labels:  xcode, cocoapods, carthage

SHSearchBar

Twitter CI status Github Current Release Xcode 12.0+ iOS 10.0+ Github Repo Size Github Code Size Github Closed PR's License Codebeat 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 tailor to your needs
  • generally the appearance is not customizable (e.g. the font of the text)
  • there are some strange behaviors when you set a custom background image

Since I use a UITextField these restrictions do not apply.

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 for 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 for SPM 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 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:

You can show a custom placeholder like for normal text fields:
Placeholder

And you can even type text into that searchbar:
Text

Wow there are customizable accessory views too:
Accesssory Icon

Easily customize text and cancel button as you want:
Customizable text and ancel button

You can customize each corner radius of the text field so that layouts like this become an ease:
Corner Radius Customization

The inner text field supports the new iOS 10 'textContentMode':
(Re-uses the address searched in Apple Maps before)
UITextContentMode Support

You can use the search bar inside a UINavigationBar:
UINavigationBar Support

Contribution

  • 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.

Author

Stefan Herold • 🐦 @Blackjacxxx

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].