add yourself as a UIScrollViewDelegate to the UITableView and implement - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView so that if your views are in starting positions, they do this:
- your UITableView animates its size in the second state:
[UIView animateWithDuration:.1f animations:^{ CGRect theFrame = myView.frame; theFrame.size.height += floatOfIncreasedHeight; myView.frame = theFrame; }]
- your UIView animates its vertical movement
[UIView animateWithDuration:3 delay:0 options:UIViewAnimationOptionCurveLinear animations:^(void){ view.center = CGPointMake(view.center.x , view.center.y + floatOfVerticalMovement); }completion:^(BOOL Finished){ view.center = CGPointMake(view.center.x , view.center.y - floatOfVerticalMovement);]
Finally, we always implement β scrollViewDidScrollToTop: in order to let you know that you can return to its original state (using the same methods that were canceled).
UPDATE:
since your views are inside the scroll, there is an easier way if you are fine with a table view that is partially outside your starting position (i.e. instead of resizing it, it just scrolls):
size the scroll frame to the final tableview + size of your initial (total) view and place it at 0.0 (so that its final part will be hidden outside the screen)
scrollview.frame = CGRectMake(0,0,tableview.frame.size.width,tableview.frame.size.height + view.frame.size.height);
you make the contents of the scrollview container as big as the whole table view + the whole view + view size you want when scrolling the table view.
scrollview.contentSize = CGSizeMake(scrollview.frame.size.width, tableview.frame.size.height + view.frame.size.height + floatOfViewHeightIWantOutOfTheWay);
you put the view one by one in the scrollview, leaving all the extra white space after the table view
view.frame = CGRectMake(0,0,view.frame.size.width, view.frame.size.height); tableview.frame = CGRectMake(0,view.frame.size.height, tableview.frame.size.width, tableview.frame.size.height);
Now it should just work, because it supports iOS 3 nested scrolling