NSButton setAction selector

后端 未结 4 996
轮回少年
轮回少年 2021-01-13 20:13

I just want to add a NSButton with setAction Arguments.

NSRect frame = NSMakeRect(10, 40, 90, 40);  
NSButton* pushButton = [[NSButton alloc] initWithFrame:          


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 20:30

    You can use associated Objects for passing arguments.

    You can refer : http://labs.vectorform.com/2011/07/objective-c-associated-objects/

    http://www.cocoanetics.com/2012/06/associated-objects/

提交回复
热议问题