-1

I am trying to run a custom animation before I dismiss my modalviewcontroller. The animation works fine however the result is a black screen because I assume the presenting view controller isn't loaded yet. Is there any way to load the presentingViewController, perform my animation, and then dismiss the modalviewcontroller.

Note: presentingViewController is currently pointing to my tabbarcontroller and not the actual uiviewcontroller that presented the modalview.

Thanks!

[UIView beginAnimations:@"suck" context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:103 forView:self.navigationController.view cache:YES];
[[self navigationController].view setHidden:YES];
[UIView setAnimationPosition:CGPointMake(260, 431)];
[UIView commitAnimations];
chourobin
  • 4,004
  • 4
  • 35
  • 48

1 Answers1

0

So I found another way is to create a screenshot image of the modalview, dismiss the modalviewcontroller with animation set to NO, and then animate the image on top of the previous view controller.

Thanks to How do I make an expand/contract transition between views on iOS? for showing how to produce the image.

Community
  • 1
  • 1
chourobin
  • 4,004
  • 4
  • 35
  • 48