KeyboardHelper
public final class KeyboardHelper : NSObject
extension KeyboardHelper: UISearchBarDelegate
extension KeyboardHelper: UITextFieldDelegate
KeyboarHelper is used to optimize the soft keyboard performance.
Version
1.5.0Date
16/08/2019-
The delegate
Declaration
Swift
public weak var delegate: KeyboardHelperDelegate? -
The root view.
Declaration
Swift
public weak var rootView: UIView? -
A list of input views that need the help of KeyboardHelper.
Declaration
Swift
public var inputViews: [UIView] { get set } -
Initialize the object. It should be initalized after the view is rendered.
Declaration
Swift
public init(application: UIApplication = .shared, notificationCenter: NotificationCenter = .default)Parameters
applicationThe application that contains the window.
-
Hide the keyboard.
Declaration
Swift
public func hideKeyboard() -
Start observing the keyboard.
Declaration
Swift
public func startObservingKeyboard() -
Stop observing the keyboard and perform the push action.
Declaration
Swift
public func stopObservingKeyboard() -
Undocumented
Declaration
Swift
public func searchBarShouldBeginEditing(_ searchBar: UISearchBar) -> Bool -
Undocumented
Declaration
Swift
public func searchBarSearchButtonClicked(_ searchBar: UISearchBar) -
Undocumented
Declaration
Swift
public func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) -
Undocumented
Declaration
Swift
public func searchBar(_ searchBar: UISearchBar, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool -
Undocumented
Declaration
Swift
public func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) -
Undocumented
Declaration
Swift
public func searchBarTextDidEndEditing(_ searchBar: UISearchBar) -
Undocumented
Declaration
Swift
public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool -
Undocumented
Declaration
Swift
public func textFieldShouldReturn(_ textField: UITextField) -> Bool -
Undocumented
Declaration
Swift
@objc public func textFieldDidChangeText(textField: UITextField) -
Undocumented
Declaration
Swift
public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool -
Undocumented
Declaration
Swift
public func textFieldDidBeginEditing(_ textField: UITextField) -
Undocumented
Declaration
Swift
public func textFieldDidEndEditing(_ textField: UITextField)
KeyboardHelper Class Reference