A simple keyboard accessory toolbar for iOS implemented in Swift.
Simply add KeyboardAccessoryToolbar.swift in your project.
extension ViewController: UITextFieldDelegate {
func textFieldShouldBeginEditing(textField: UITextField) -> Bool {
// Set to specific text field
if textField == self.textField {
// Set toolbar's current view to active text field
// This will also set the view's input accessory view to accessory toolbar
accessoryToolbar.currentView = textField
}
return true
}
}
Copyright (c) 2015 Joe Christopher Paul Amanse. This software is distributed under the MIT License