You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
Installation
IQTextInputViewNotification is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod'IQTextInputViewNotification'
Usage
To observe textInputView becomeFirstResponder and resignFirstResponder changes, subscribe to the textInputView events:-
import IQTextInputViewNotification
classViewController:UIViewController{privatelettextInputViewObserver:IQTextInputViewNotification=.init()overridefunc viewWillAppear(_ animated:Bool){
super.viewWillAppear(animated)
// Subscribe
textInputViewObserver.subscribe(identifier:"YOUR_UNIQUE_IDENTIFIER"){info inprint(info.event.name) // BeginEditing or EndEditing event
print(info.textInputView) // TextInputView which begin editing or end editing
// Write your own logic here based on event
}}overridefunc viewWillDisappear(_ animated:Bool){
super.viewWillDisappear(animated)
// Unsubscribe
textInputViewObserver.unsubscribe(identifier:"YOUR_UNIQUE_IDENTIFIER")}}