title: iOS UIButtons not responding
body: <p>I am having a problem whereby I am adding images to a view, which has a parent(scrollView).
  The problem is that although I am setting a selector for every button, only the most recently generated button in the view responds to the selector and calls the method.</p>
  
  <pre><code>for (int i = 0; i &lt; [_wordsArray count]; i++) {
  
      buttonFrame = CGRectMake(WORDSLEFTBOUNDARY, heightPlacement, [_detailSlider value], [_detailSlider value]);
      UIButton *button = [[UIButton alloc] initWithFrame: buttonFrame];
  
      // set the image for the button
      [button setImage:[UIImage imageNamed:@"wordicon.png"] forState:UIControlStateNormal];
      [button setTag:i]; // set tag identifier for the button
  
      // add selector method 'buttonClickedAction' so that the method is called when a user
      // clicks one of the buttons.
      [button addTarget:self
                 action:@selector(buttonClickedAction:)
       forControlEvents:UIControlEventTouchUpInside];
  
      [_buttonsView addSubview: button]; // add newly created button as a subview to the buttonView
  
      [_wordButtonArray addObject:button]; // insert newly created button into the wordButtonArray
  
      if (i &lt; [_dateDifferences count]) {
          heightPlacement -= 60 + (60 * [[_dateDifferences objectAtIndex:i] intValue]);
      }
  }
  </code></pre>
  
  <p>So in the above code I create each button and add the selector before adding it to an array of buttons. However my responder method (buttonClickedAction) is not being called for some reason.</p>