Mike Z
Mike Z

Reputation: 4111

Form Sheet Modal View Animations

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

Answers (3)

Igor Kovryzhkin
Igor Kovryzhkin

Reputation: 2215

All the transition Styles:

newModalView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
newModalView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

Upvotes: 0

user2953426
user2953426

Reputation:

This is a known bug and is being worked on by apple.

Upvotes: 1

Tripti Kumar
Tripti Kumar

Reputation: 1581

Try something like this:

newModalView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

Upvotes: 0

Related Questions