How can I subclass HMGLTransitionManager? I'm attempting it now, but my override methods are not being called. Is there a recommended way to create a subclass? Do the source files need to be changed so that the superclass methods are declared in the .h?
I want to subclass HMGLTransitionManager so I can choose my own "destination" view controller after dismissing a modal view controller.
For example, I have a modal view controller which is called from a view controller on a navigation controller stack. Then that same modal view controller calls its own modal view controller (so there are now 2 modal view controllers open and stacked on top of each other). When I dismiss the currently visible modal view controller, I want to return to the original view controller on the nav stack.
Here is a visual interpretation (VC stands for view controller):
VC A (on nav stack) -> VC B (modal) -> VC C (modal)
When I dismiss VC C, I want to return to VC A instead of VC B. I've found the only way to do this is to make some changes to HMGLTransitionManager's dismissModalViewController method. Specifically I've added this line:
self.currentController = modalViewController.presentingViewController.presentingViewController;
which works correctly, but I want to add it to a subclass instead of altering the source files directly.