//Create a button and set it as content viewNSButton* button = [[NSButton alloc] initWithFrame:NSMakeRect(200, 200, 60, 40)]; [button setTitle:@"Quit Application"];
[button setTarget:controller]; [button setAction:@selector(onButtonClicked:)];
双击该按钮