title: Adding UIButton outside of the screen
body: <p>I'm creating and adding an UIButton dynamically to UIView, like:</p>
  
  <pre><code>UIButton *btn = [UIButton buttonWithType:UIButtonTypeContactAdd];
  btn.frame = CGRectMake(100, 10, btn.bounds.size.width, btn.bounds.size.height);
  [btn addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
  [myView addSubview:btn];
  </code></pre>
  
  <p>This works as expected, myAction gets called. The problem begins as I add this to the outside of the visible myView, like:</p>
  
  <pre><code>btn.frame = CGRectMake(-100, 10, btn.bounds.size.width, btn.bounds.size.height);
  </code></pre>
  
  <p>later on, I animate myView out of the screen to make btn visible:</p>
  
  <pre><code>[UIView beginAnimations:nil context:NULL];
  [myView layer].frame = CGRectMake(320, 0, 320, 48);
  [UIView commitAnimations];
  </code></pre>
  
  <p>But the thing is, myAction does not get called anymore. Why? And how to fix it?</p>