0

With the default presentation modal partial curl segue from one view to another, I would like to reverse the animations. So that, instead of lifting a page to reveal the second view, a page falls down on top of the first view and reveals the second view. Then, when the user is done with the second view, the page lifts up to reveal the first view again.

How on earth would I do this? Make the animations myself using a custom transition somehow?

1 Answers1

1

What you are after is UIView tradition with animation.

    [UIView transitionFromView:youBaseView
                    toView:modalView
                  duration:3.0
                   options:UIViewAnimationOptionTransitionCurlDown
                completion:^(BOOL finished) {
                }];

This will get you effect you described. I think quickest and easiest way to get this done is custom segue. Just subclass UIStoryboardSegue. This post talks about it in detail : How to create custom modal segue in 4.2 Xcode using storyboard

Then for dismissing modal view do something like:

[UIView transitionFromView:modalView
                    toView:yourBaseView
                  duration:3.0
                   options:UIViewAnimationOptionTransitionCurlDown
                completion:^(BOOL finished) { 
                [self dismissModalViewControllerAnimated:NO];
                }];

Hope this will help.

Community
  • 1
  • 1
stringCode
  • 2,274
  • 1
  • 23
  • 32