title: Objective-C: An array of UIButtons
body: <p>If I have a large number of buttons set up in Interface Builder, how can I place them into an array via code?</p>
  
  <p>For example, if I have three buttons and in the interface file I define them:</p>
  
  <pre><code>@property (nonatomic, retain) IBOutlet UIButton *button1;
  @property (nonatomic, retain) IBOutlet UIButton *button2;
  @property (nonatomic, retain) IBOutlet UIButton *button3;
  </code></pre>
  
  <p>If I want to rename each of these buttons to say "Hello", I want to be able to lump them into an array and then use a function such as:</p>
  
  <pre><code>for (int i = 0; i &lt; someArray.count; i++)
  {
      someArray[i].text = @"Hello";
  }
  </code></pre>
  
  <p>Could someone please provide information on how this is achieved (if it's possible)?</p>
  
  <p>Thanks</p>