Well, you can animate the size of your window to simulate a slide on top:
[UIView beginAnimations:nil context:NULL]
[UIView setAnimationDuration:0.3]
myView.frame = CGRectMake(0, buttonHeight+buttonTop, myView.frame.size.width, viewTargetHeight);
[UIView commitAnimations]
Make sure you set the height of the view to 0. When you create it.
To scroll it back, just do the opposite
[UIView beginAnimations:nil context:NULL]
[UIView setAnimationDuration:0.3]
myView.frame = CGRectMake(0, buttonHeight+buttonTop, myView.frame.size.width, 0);
[UIView commitAnimations]
If you really want your new view to slide, you can try to animate both the size and the position, and you also probably need to fix your animated view to a different view.
source
share