title: Subviews of animated UIView not keeping their constraints during animation
body: <p>I'm animating a custom UIView to expand, as shown in the gif below (the red view).
  When clicking the open/close-button, I want the left icon to stay in its superview's center, vertically. As shown below, as soon as I click the button, the icon will pop to where it should be after the animation is done.
  The same goes for the button, but it's not as noticeable as it gets temporarily hidden from clicking it.</p>
  
  <p>I was also hoping for the <code>UILabel</code> in between to animate its size, rather than popping to minimum height as soon as you click 'Close'.</p>
  
  <p>In Storyboard I have set the icon and button to align center with the superview, which to me seems to be the correct way to achieve what I want. I would assume that when I animate the superview, that the subviews would stay center during the animation, but instead they instantly move to the point that WILL be correct, but after the animation is completed.</p>
  
  <p><a href="https://i.stack.imgur.com/KVpYc.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KVpYc.gif" alt="gif"></a></p>
  
  <p>My animation code:</p>
  
  <pre><code>UIView.animateWithDuration(0.4, animations: { () -&gt; Void in
  
      var rect = self.frame; //The current frame, to change
      let oldHeight = self.frame.size.height as CGFloat
  
      let newSize = self.sizeForBanner() //Get the CGSize for the big banner.
  
      if(self.isBig) //Animate to big size
      {
          //Put the new height and origin for the large version of the view
          rect.size.height = newSize.height;
          rect.origin.y -= (rect.size.height - oldHeight)
  
      }else{ //Animate to small size
  
          //Put the new height and origin for the small version of the view
  
          rect.size.height = self.minimalHeight;
          rect.origin.y += oldHeight-rect.size.height
      }
  
          //Set the new variables
          self.frame = rect;
  
      }) { (Bool) -&gt; Void in
          //Completion
  }
  </code></pre>
  
  <p>How /what do I change to make the icon and the button to stay centered when the superview animates?..</p>