Search code examples
objective-ccocoansbuttonoutlet

Array of NSButton


I wonder if I can do something like

IBOutlet NSButton * aButton[100];

It turns out that aButton cannot be seen in the interface builder.

My app has lots of buttons and I want to see if there are way I can use looping to iterate the state of all buttons.


Solution

  • IB doesn't handle arrays. You can add them using a loop in your code instead.