KeyboardObserver
final public class KeyboardObserver
This is a convenience helper to manage keyboard appearances and disappearances.
Usage
Instanciate the object in your view controller’s viewWillAppear
to start observing notifications.
The object will stop observing notifications so as long as you don’t have memory leaks, you don’t
need to handle it anywhere else. Otherwise, just reinit your keyboard observer to nil
and it will
stop observing.
Inspiration
-
Returns a newly initialized keyboard observer.
Declaration
Swift
public init(toggleKeyboardHandler: @escaping (CGFloat) -> ())