title: Add subview that's docked to the bottom of superview (custom keyboard)
body: <p>I'm attempting to create a custom view that appears exactly like the keyboard, but I can't figure out how to use frame manipulation and/or programmatic auto layout to solve my problem.</p>
  
  <p>Some context: I have a messaging app style view controller with a textview and button docked at the bottom of the screen.  All views are wrapped into a nice single content view with autolayout set such that when the keyboard appears, it pushes the entire view up, and when it disappears it pushes the entire view back down.  This is the behavior I'm trying to reproduce.</p>
  
  <p>I messed around with trying to manually resize frames similar to my keyboard code but ended up throwing that away in favor of a auto-layout based solution.  Here's what I have so far:</p>
  
  <pre><code>    StickersCollectionViewController *stickerController = [self.storyboard instantiateViewControllerWithIdentifier:@"StickersCollectionViewController"];
  
  [self addChildViewController:stickerController];
  [self.view addSubview:stickerController.view];
  [stickerController didMoveToParentViewController:self];
  
  NSLayoutConstraint *constraint = [NSLayoutConstraint constraintWithItem:stickerController.view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:self.view.bounds.size.height];
  [self.view addConstraint:constraint];
  
  NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:stickerController.view attribute:NSLayoutAttributeWidth
                               relatedBy:NSLayoutRelationEqual toItem:self.view
                               attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0.0];
  
  NSLayoutConstraint *height = [NSLayoutConstraint constraintWithItem:stickerController.view
                                                     attribute:NSLayoutAttributeHeight
                                                     relatedBy:NSLayoutRelationEqual
                                                        toItem:nil
                                                     attribute:NSLayoutAttributeNotAnAttribute
                                                    multiplier:1.0
                                                      constant:240.0];
  
  [self.view addConstraint:width];
  [self.view addConstraint:height];
  
  
  double delayInSeconds = 0.0;
  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
  dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
      constraint.constant = 240.0;
      [UIView animateWithDuration:0.3 
                       animations:^{
                           [self.view layoutIfNeeded];
                       }];
  });
  </code></pre>
  
  <p>So far, this looks great: the view is instantiated and added just off screen, then animates into view.  However, I'd also like my superview (mentioned above) to also animate with this view.  This is the piece I need help with.</p>
  
  <p>Can anyone offer help in this direction?  Or offer a suggestion as to a different route I could go?  Thanks.</p>