zetachang / DCModalSegue

A custom segue which makes a pushed back modal presenting animation.
MIT License
319 stars 23 forks source link

Usage of DCModalViewController #4

Closed alariccole closed 11 years ago

alariccole commented 11 years ago

Thanks for providing this example of taking a screenshot of a view for help in creating a modal segue. I'm not understanding the purpose of creating a new DCModalViewController, however. It seems to me that this kind of thing doesn't belong in the segue, so I'm wondering what the purpose of it is.

zetachang commented 11 years ago

I think the whole segue mechanism provided is to abstract the idea of view controller transition. And the purpose of creating a intermediate DCModalViewController is to have a place to coordinate the whole transition including adding the screenshot to its subviews. The most important part is that we need a place to hook up the dismiss method - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion to do the clean up and the pushed forward animation.