File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,10 @@ open class DropDown : UITextField{
143143 self . backgroundView. backgroundColor = . clear
144144 addGesture ( )
145145 if isSearchEnable && handleKeyboard{
146- NotificationCenter . default. addObserver ( forName: NSNotification . Name . UIKeyboardWillShow , object: nil , queue: nil ) { ( notification) in
146+ NotificationCenter . default. addObserver ( forName: UIResponder . keyboardWillShowNotification , object: nil , queue: nil ) { ( notification) in
147147 if self . isFirstResponder{
148148 let userInfo : NSDictionary = notification. userInfo! as NSDictionary
149- let keyboardFrame : NSValue = userInfo [ UIKeyboardFrameEndUserInfoKey ] as! NSValue
149+ let keyboardFrame : NSValue = userInfo [ UIResponder . keyboardFrameEndUserInfoKey ] as! NSValue
150150 let keyboardRectangle = keyboardFrame. cgRectValue
151151 self . keyboardHeight = keyboardRectangle. height
152152 if !self . isSelected{
@@ -155,7 +155,7 @@ open class DropDown : UITextField{
155155 }
156156
157157 }
158- NotificationCenter . default. addObserver ( forName: NSNotification . Name . UIKeyboardWillHide , object: nil , queue: nil ) { ( notification) in
158+ NotificationCenter . default. addObserver ( forName: UIResponder . keyboardWillHideNotification , object: nil , queue: nil ) { ( notification) in
159159 if self . isFirstResponder{
160160 self . keyboardHeight = 0
161161 }
You can’t perform that action at this time.
0 commit comments