It's simple: just leave the frame of the container in the same block as the animation of your banner. It will be something like this:
[UIView animateWithDuration:1.0 animations:^ { view.frame = CGRectMake(0.0, self.view.frame.size.height - view.frame.size.height, view.frame.size.width, view.frame.size.height); self.containerView.frame = CGRectMake( self.containerView.frame.origin.x, self.containerView.frame.origin.y, self.containerView.frame.size.width, self.containerView.frame.size.height - view.frame.size.height); }];
This piece of code will reduce your View container as the same height of your banner and at the same time. You can change / adapt as you wish.
Edit: if you use autorun, you must create an IBOutlet to limit and animate it, not the frame itself.
source share