ModernSearchBar alternatives and similar libraries
Based on the "TextField & TextView" category.
Alternatively, view ModernSearchBar alternatives based on common mentions on social networks and blogs.
-
JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
PYSearch
๐ An elegant search controller which replaces the UISearchController for iOS (iPhone & iPad) . -
SkyFloatingLabelTextField
A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift. -
Reel Search
:octocat: ๐ RAMReel is a UI controller that allows you to choose options from a list. Swift UI library made by @Ramotion -
StatefulViewController
Placeholder views based on content, loading, error or empty states -
NextGrowingTextView
๐ The next in the generations of 'growing textviews' optimized for iOS 8 and above. -
MLPAutoCompleteTextField
UITextfield subclass with autocomplete menu. For iOS. -
SearchTextField
UITextField subclass with autocompletion suggestions list -
RPFloatingPlaceholders
UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text. -
InputBarAccessoryView
A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments -
GrowingTextView
An UITextView in Swift. Support auto growing, placeholder and length limit. -
AnimatedTextInput
Animated UITextField and UITextView replacement for iOS -
RSKGrowingTextView
A light-weight UITextView subclass that automatically grows and shrinks. -
KMPlaceholderTextView
A UITextView subclass that adds support for multiline placeholder written in Swift. -
UITextField-Shake
UITextField category that adds shake animation -
InstantSearch iOS
โก๏ธ A library of widgets and helpers to build instant-search applications on iOS. -
AutocompleteField
Subclass of UITextField that shows inline suggestions while typing. -
SelectableTextView
A text view that supports selection and expansion -
TweeTextField
Lightweight set of text fields with nice animation and functionality ๐ -
UITextField-Navigation
๐โโ๏ธ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews -
TextFieldCounter
UITextField character counter with lovable UX ๐. No math skills required ๐. -
VMaskTextField
VMaskTextField is a library which create an input mask for iOS. -
IQDropDownTextField
TextField with DropDown support using UIPickerView -
DTTextField
DTTextField is a custom textfield with floating placeholder and error label -
EmojiTextView
Tap to swap out words with emojis. Inspired by Messages.app on iOS 10. -
PasswordTextField
A custom TextField with a switchable icon which shows or hides the password and enforce good password policies -
CocoaTextField
Apple TextField created according to the Material.IO guidelines of 2019. Featured at Medium. -
ARAutocompleteTextView
ARAutocompleteTextView is a subclass of UITextView that automatically displays text suggestions in real-time. This is perfect for automatically suggesting the domain as a user types an email address, #hashtag or @alexruperez. -
CHIOTPField
CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io -
RSKPlaceholderTextView
A light-weight UITextView subclass that adds support for placeholder. -
styled-text
Declarative text styles and streamlined Dynamic Type support for iOS -
AwesomeTextField
Awesome TextField is a nice and simple libriary for iOS and Mac OSX. It's highly customisable and easy-to-use tool. Works perfectly for any registration or login forms in your app. -
Streamoji
:godmode: Custom emoji rendering library for iOS apps with support for GIF & still images - plug-in extension for UITextView - performance, cache โ - Made with ๐ by @GetStream -
CBPinEntryView
A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes. -
MBAutoGrowingTextView
An auto-layout base UITextView subclass which automatically grows with user input and can be constrained by maximal and minimal height -
Tagging
A TextView that provides easy to use tagging feature for Mention or Hashtag -
MVAutocompletePlaceSearchTextField
iOS - Subclass of UITextField to achieve autocompletion for Place Search like Google Places, Uber and Much more apps having maps. -
SRKControls
A Custom control which turns UITextfield to item-picker & date-picker. -
RSFloatInputView
A Float Input View with smooth animation and supporting icon and seperator written with Swift -
PLCurrencyTextField
UITextField that support currency in the right way. -
CurrencyTextField
UITextField that automatically formats text to display in the currency format -
AutoCompleteTextField
TextField with smart suggestion -
NxEnabled
Library that allows you binding `enabled` property of button with textable elements (TextView, TextField) -
MeasurementTextField
UITextField-based control for (NS)Measurement values input.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ModernSearchBar or a related project?
README
PRESENTATION
This search bar will allow you to offer suggestions words to your users when they are looking for something using default iOS search bar. Enjoy it !
DEMO
Two ways to use this lib :
- One with a simple array of string (Array<String>)
- The other with an array of custom object (Array<ModernSearchBarModel>) if you want to get image of each row from an url.
SIMPLE | ADVANCED |
---|---|
![]() |
![]() |
INSTALLATION
CocoaPods
You can use CocoaPods to install ModernSearchBar
by adding it to your Podfile
:
pod 'ModernSearchBar'
Manually
- Download and drop all *.swift files contained in Pod folder in your project.
- Don't forget to import the assets folder too.
- Enjoy !
USAGE
1 - Configure StoryBoard (Custom Class)
2 - Configure ViewController
//Import lib on the top of ViewController
import ModernSearchBar
//Create an IBOutlet from your searchBar
@IBOutlet weak var modernSearchBar: ModernSearchBar!
//Extend your ViewController with 'ModernSearchBarDelegate'
class ViewController: UIViewController, ModernSearchBarDelegate
//Implement the delegation
self.modernSearchBar.delegateModernSearchBar = self
//Set datas to fill the suggestionsView of the searchbar.
//Two ways (you have to choose only one, you can't implement both obviously)
// 1 - With an Array<String>
var suggestionList = Array<String>()
suggestionList.append("Onions")
suggestionList.append("Celery")
self.modernSearchBar.setDatas(datas: suggestionList)
// 2 - With custom Array<ModernSearchBarModel>
var suggestionListWithUrl = Array<ModernSearchBarModel>()
suggestionListWithUrl.append(ModernSearchBarModel(title: "Alpha", url: "https://github.com/PhilippeBoisney/ModernSearchBar/raw/master/Examples%20Url/exampleA.png"))
suggestionListWithUrl.append(ModernSearchBarModel(title: "Bravo", url: "https://github.com/PhilippeBoisney/ModernSearchBar/raw/master/Examples%20Url/exampleB.png"))
self.modernSearchBar.setDatasWithUrl(datas: suggestionListWithUrl)
DELEGATE
ModernSearchBarDelegate inherit from UISearchBarDelegate, so you can find commons methods you already use in your project. Also, I add those methods to handle click actions on suggestionsView.
///Called if you use String suggestion list
func onClickItemSuggestionsView(item: String) {
print("User touched this item: "+item)
}
///Called if you use Custom Item suggestion list
func onClickItemWithUrlSuggestionsView(item: ModernSearchBarModel) {
print("User touched this item: "+item.title+" with this url: "+item.url.description)
}
///Called when user touched shadowView
func onClickShadowView(shadowView: UIView) {
print("User touched shadowView")
}
CUSTOMIZING
//Modify shadows alpha
self.modernSearchBar.shadowView_alpha = 0.8
//Modify the default icon of suggestionsView's rows
self.modernSearchBar.searchImage = ModernSearchBarIcon.Icon.none.image
//Modify properties of the searchLabel
self.modernSearchBar.searchLabel_font = UIFont(name: "Avenir-Light", size: 30)
self.modernSearchBar.searchLabel_textColor = UIColor.red
self.modernSearchBar.searchLabel_backgroundColor = UIColor.black
//Modify properties of the searchIcon
self.modernSearchBar.suggestionsView_searchIcon_height = 40
self.modernSearchBar.suggestionsView_searchIcon_width = 40
self.modernSearchBar.suggestionsView_searchIcon_isRound = false
//Modify properties of suggestionsView
///Modify the max height of the suggestionsView
self.modernSearchBar.suggestionsView_maxHeight = 1000
///Modify properties of the suggestionsView
self.modernSearchBar.suggestionsView_backgroundColor = UIColor.brown
self.modernSearchBar.suggestionsView_contentViewColor = UIColor.yellow
self.modernSearchBar.suggestionsView_separatorStyle = .singleLine
self.modernSearchBar.suggestionsView_selectionStyle = UITableViewCellSelectionStyle.gray
self.modernSearchBar.suggestionsView_verticalSpaceWithSearchBar = 10
self.modernSearchBar.suggestionsView_spaceWithKeyboard = 20
Version
1.5
License
Copyright 2017 Boisney Philippe
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create New Pull Request
Author
Philippe BOISNEY (phil.boisney(@)gmail.com)
*Note that all licence references and agreements mentioned in the ModernSearchBar README section above
are relevant to that project's source code only.