Toolbar alternatives and similar libraries
Based on the "Keyboard" category.
Alternatively, view Toolbar alternatives based on common mentions on social networks and blogs.
-
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
IHKeyboardAvoiding
IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required! -
MMNumberKeyboard
A simple keyboard to use with numbers and, optionally, a decimal point. -
NgKeyboardTracker
Objective-C library for tracking keyboard in iOS apps. -
YYKeyboardManager
iOS utility class allows you to access keyboard view and track keyboard animation. -
RFKeyboardToolbar
[iOS] Add customized buttons and toolbars to your UITextInputs. -
Ribbon
๐ A simple cross-platform toolbar/custom input accessory view library for iOS & macOS. -
KeyboardObserver
For less complicated keyboard event handling. -
AutoKeyboardScrollView
AutoKeyboardScrollView is an UIScrollView subclass which makes showing and dismissing keyboard for UITextFields much easier. So called keyboard avoidance. -
KeyboardHideManager
Codeless manager to hide keyboard by tapping on views for iOS written in Swift -
RSKKeyboardAnimationObserver
Showing / dismissing keyboard animation in simple UIViewController category.
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 Toolbar or a related project?
README
Toolbar
This toolbar is made with Autolayout. It works more interactively than UIToolbar.
Please Donate
Slow Animations Debug mode
If you want a Toolbar that works with the keyboard, please see here. https://github.com/1amageek/OnTheKeyboard
Installation
- Inset
pod 'Toolbar'
to your Podfile. - Run
pod install
Usage
Height and Width of the Toolbar are determined automatically. Do not set frame.
Initialization.
let toolbar: Toolbar = Toolbar()
let toolbar: Toolbar = Toolbar()
lazy var camera: ToolbarItem = {
let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "camera"), target: nil, action: nil)
return item
}()
lazy var microphone: ToolbarItem = {
let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "microphone"), target: nil, action: nil)
return item
}()
lazy var picture: ToolbarItem = {
let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "picture"), target: nil, action: nil)
return item
}()
var toolbarBottomConstraint: NSLayoutConstraint?
override func loadView() {
super.loadView()
self.view.addSubview(toolbar)
self.toolbarBottomConstraint = self.toolbar.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0)
self.toolbarBottomConstraint?.isActive = true
}
override func viewDidLoad() {
super.viewDidLoad()
self.toolbar.maximumHeight = 100
self.toolbar.setItems([self.camera, self.picture, self.microphone], animated: false)
}
Hide items
func hideItems() {
self.camera.setHidden(false, animated: true)
self.microphone.setHidden(false, animated: true)
self.picture.setHidden(false, animated: true)
}
Stretchable TextView
You can control the height by setting maximumHeight
.
// ViewController
override func viewDidLoad() {
super.viewDidLoad()
self.toolbar.maximumHeight = 100
let textView: UITextView = UITextView(frame: .zero)
textView.delegate = self
textView.font = UIFont.systemFont(ofSize: 14)
self.toolbar.setItems([textView], animated: false)
}
// UITextViewDelegate
func textViewDidChange(_ textView: UITextView) {
let size: CGSize = textView.sizeThatFits(textView.bounds.size)
if let constraint: NSLayoutConstraint = self.constraint {
textView.removeConstraint(constraint)
}
self.constraint = textView.heightAnchor.constraint(equalToConstant: size.height)
self.constraint?.priority = UILayoutPriorityDefaultHigh
self.constraint?.isActive = true
}
var constraint: NSLayoutConstraint?