Open onmyway133 opened 5 years ago
I tried this code and viewDidLoad
gets called but controlTextDidChange
does not. Any idea what I am doing wrong?
I initiatate the ViewController in code:
NSTabViewItem *tabViewItem = [[NSTabViewItem alloc]
initWithIdentifier:@"time"];
[tabViewItem setLabel:@"Time"];
[tabView tabViewItem];
ViewController *viewController = [[ViewController alloc]
initWithNibName:@"tabView" bundle:nil];
[tabViewItem setView:[viewController view]];
Storyboard
In Storyboard,
NSTextField
has an Action option that specify whetherSend on
Send on Enter only` should be the default behaviour.Code
In code,
NSTextFieldDelegate
notifies whenever text field value changes, andtarget action
notifies when Enter key is pressedUse EasyClosure
If we use EasyClosure then this is easy