Swift: How to continuously send an action from a NSTextField
问题 I have a NSTextField and want to send an action whenever the user changes the value. I checked "Continuous" in the Interface Builder (which works i.e. fine with NSSlider), but the NSTextField only sends his action if I unfocus it. How can I continuously send an action from a NSTextField (using Swift)? 回答1: Set the delegate of the text field to the class which is supposed to receive the action and implement func controlTextDidChange(_ obj: NSNotification) This method is invoked when text in a