Reputation: 4111
I have UIModalPresentationFormSheet
views appearing in my app. Some of them appear from the Right
some from the Bottom
and the dismissing seems random. Some disappear to the Bottom
some go Left
some go Up
. Is there a way to set the direction they appear from and dismiss to?
Code I use to present (this same code, just different viewcontroller being presented, called from the same view controller has varying animations for different modal views):
MyViewController *newModalView = [[MyViewController alloc] init];
newModalView.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:newModalView animated:YES];
Then in the modal view I call this to dismiss it:
[self dismissModalViewControllerAnimated:YES];
Upvotes: 4
Views: 4670
Reputation: 2215
All the transition Styles:
newModalView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
newModalView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
Upvotes: 0
Reputation: 1581
Try something like this:
newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
Upvotes: 0