objective c - How to create a action to a button in Cocoa programmatically? -


I am trying to create a button in Mac program in Maco, but I do not know how, Trying to:

  NSRact frame = NSMKAct (10, 200, 80, 100); NSButton * btn = [[NSButton alloc] initWithFrame: frame]; [BTN Set button type: NsmemberRepash Inbutton]; [BTN set bezel style: NSRattbeizle style]; [BTN SETTITAL: @ "Click Me"]; [BTN Set Action: @Selector (hide labels :)); [Adsview view: BTN] See;   

but line [BTN set action: @Selector (hide label)]; Do not work, how can I make an action here?

The method hides the labels in the function, because I used it with the second button.

Does your hidden label method take an argument? If not, leave it: Selector

Comments

Popular posts from this blog

python - Assemble mpeg file unable to play in mediaplayer -

c# - crystal report failed -

mongodb - CakePHP paginator ignoring order, but only for certain values -