Skip to content

Instantly share code, notes, and snippets.

@chamons
Created December 8, 2014 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamons/5e5045841aee826b396e to your computer and use it in GitHub Desktop.
Save chamons/5e5045841aee826b396e to your computer and use it in GitHub Desktop.
@implementation MyDel
- (void)comboBoxSelectionDidChange:(NSNotification *)notification
{
NSLog (@"Did Change");
}
- (void)comboBoxSelectionIsChanging:(NSNotification *)notification
{
NSLog (@"Is Changing");
}
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSComboBox * b = [[NSComboBox alloc] initWithFrame:NSMakeRect(0, 0, 200, 25)];
[b addItemsWithObjectValues:@[@"1", @"2", @"3"]];
b.delegate = [[MyDel alloc]init];
[[self view]addSubview:b];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment