NSNotification.Name.UITextFieldTextDidEndEditing

NSNotification.Name.UITextFieldTextDidEndEditing worked in Xcode 9.


XCode 10 didn't like it and wanted to change it to:


NSNotification.Name.UITextField.textDidEndEditingNotification


but it gives the error NSNotification.Name has no member 'UITextField'


Thought the NS might need to be replaced with just Notification.Name... it doesn't like that either.


What is the proper notification when textFieldDidEndEditing?

Replies

So it appears that the "fix it" button didn't go far enough.


what was


myVariable = center.addObserver(forName: NSNotification.Name.UITextFieldTextDidEndEditing, object: textFieldName, queue: queue)....


is now


myVariable = center.addObserver(forName: UITextField.textDidEndEditingNotification, object: textFieldName, queue: queue)....