title: How to translate an entire UIView and retain gesture recognition?
body: <p>I have a <code>UIView</code> "MainView" that initially appears as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/Q2poE.png" alt="enter image description here"></p>
  
  <p>The gradient bar is part of MainView, the whitespace beneath is part of a Container View subview.
  When the search button in top-right is tapped, I animate a searchBar from offscreen to be visible in the view:</p>
  
  <p><img src="https://i.stack.imgur.com/sXzBN.png" alt="enter image description here"> </p>
  
  <p>I manage to do this by the following code:</p>
  
  <pre><code>CGRect currentViewFrame = self.view.bounds;
  currentViewFrame.origin.y += searchViewHeight;
  
  [UIView animateWithDuration:0.4
                        delay:0.0
       usingSpringWithDamping:1.0
        initialSpringVelocity:4.0
                      options:UIViewAnimationOptionCurveEaseInOut animations:^{
                          self.view.frame = currentViewFrame;
                      }
                      completion:^(BOOL finished)
                      {
                      }];
  </code></pre>
  
  <p>Visually, the result of this animation is perfect.  The entire view shifts, and the searchBar is now on screen.  However, the searchBar does not respond to interaction.  Correct me if I'm wrong, but I expect this is because the MainView's frame no longer includes the screen area that the searchBar now occupies, so its effectively a gesture deadzone.</p>
  
  <p>So this makes me think that instead of lazily animating the entire MainView down to accomodate the searchBar, I must instead individually translate all subviews of MainView one at a time.  In this simple situation, that would not be a big problem, but I can envision a circumstance with tens of subviews making that completely unrealistic.</p>
  
  <p>What is the best method to accomplish what I am trying to do?  Is there a secret to animating entire views/subviews without having gesture deadzones?  Thanks in advance!!</p>