My user interface has four buttons, and they will all have common behavior, such as creating a tracking area. What I'm looking for is a solution, so I don't need to do this:
@interface MyController : NSWindowController { NSButton * button1; NSButton * button2; NSButton * button3; NSButton * button4; } @property (nonatomic) IBOutlet NSButton * button1; @property (nonatomic) IBOutlet NSButton * button2;
I would like to have a solution like this:
@interface MyController : NSWindowController { NSMutableArray * buttons; } @property (nonatomic) IBOutlet NSMutableArray * buttons;
Is it possible?
objective-c cocoa macos
MaurΓcio Linhares
source share