1337code
1337code

Reputation: 93

iPhone vertical view controller animation

I want it to look like the current screen goes up while the new screen comes from bottom, is there a way to do this?

I am not looking for something like presentModelViewController.

Upvotes: 1

Views: 177

Answers (1)

Snowman
Snowman

Reputation: 32061

You can just do something like this:

 [UIView animateWithDuration:2.0
                     animations:^{ 
                         view2.frame=CGRectMake(view2.frame.origin.x, 480, view2.frame.size.width, view2.frame.size.height);
                         view1.transform=CGAffineTransformMakeTranslation(0, -480);
                         view2.transform=CGAffineTransformMakeTranslation(0, -480);
                     }];

Upvotes: 2

Related Questions