The thing I want to implement here is after I press the return key, if text of the textfield is match the word January, print right, if not, print wrong.
But when I pressed the return key, Nothing is printed.
Can anyone write a sample code about how to use DidEndEditing for me?
@IBOutlet weak var wordTextfield: NSTextField!
let monthEN = "January"
func textFieldDidEndEditing(wordTextfield: NSTextField) {
if wordTextfield.stringValue == monthE{
print("right")
}else{
print("wrong")
}
}