Reputation: 1196
I am presenting a simple modal ViewController calling
[self performSegueWithIdentifier:@"SegueLogOut" sender:nil];
However when i dismiss it I want it to move upwards instead of downwards, it it possible?
[self dismissViewControllerAnimated:YES completion:nil];
EDIT:
I tried to make a custom animation, It didn't work really well. The background stays black until the modal is dismissed...
[UIView animateWithDuration:1 animations:^{
self.view.frame = CGRectMake(0, -self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height);
} completion:^(BOOL finished) {
[self dismissViewControllerAnimated:NO completion:nil];
} ];
Upvotes: 3
Views: 104
Reputation: 20234
Generally, to change the presentViewController
animation style, you set a modalTransitionStyle
property on the viewController
.
However, to answer your question, none of the (few) modalTransitionStyle
s have a predefined style to animate upwards.
You need to do the animation yourself.
Upvotes: 1