1

I have found several questions on this but haven't really seen a great answer as to how to do it other then using a delegate. I came up with a solution that works quite nicely however I'm not sure if it would be bad in the long run.

Here is my solution which thus far has performed fantastically. If anyone can tell me why this would be a bad way to implement this please let me know!

   [self dismissViewControllerAnimated:NO completion:^(){
   [[[[UIApplication sharedApplication] keyWindow] rootViewController] presentViewController:vc animated:NO completion:nil];
   }];
chris
  • 83
  • 2
  • 12

1 Answers1

0

That's the proper way to do this. In fact Apple introduced the completion blocks since iOS 5.0 especially for this kind of purposes.

Why would you want another way if the current way is simple and makes total sense?

prettyvoid
  • 3,446
  • 6
  • 36
  • 60
  • I'm not sure. From looking around stack overflow I never found this solution. Thought i'd post it to see if there was a reason – chris Oct 16 '14 at 17:58
  • Related: http://stackoverflow.com/questions/3919845/presenting-a-modal-view-controller-immediately-after-dismissing-another – prettyvoid Oct 16 '14 at 18:06