Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward UINavigationController Delegate Methods #396

Closed
tooolbox opened this issue Feb 13, 2018 · 3 comments
Closed

Forward UINavigationController Delegate Methods #396

tooolbox opened this issue Feb 13, 2018 · 3 comments

Comments

@tooolbox
Copy link

The Problem

When you enable isHeroEnabled on a UINavigationController, Hero takes over as the delegate for that VC, and saves a reference to its previous delegate in the property previousNavigationDelegate. I've encountered a situation where I want Hero to control the animations of my UINavigationController, but I also want to make another VC aware of these delegate calls.

The Proposal

Whenever Hero receives delegate methods from a UINavigationController, it should call those same methods on the previousNavigationDelegate, if there is one.

I'm working on a PR for this.

@tooolbox
Copy link
Author

Interesting, related to #25

@tooolbox
Copy link
Author

I was able to solve what I was running into by turning on Hero for the Nav Controller, and then having my own View Controller set itself as the delegate and then forward transition methods to Hero. This way is perfectly workable so I am closing the PR.

@paulpopiel
Copy link

FYI fixed in the following:
#430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants