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

Fixed issue where Hero misplaces original delegates #46

Merged
merged 1 commit into from Jan 18, 2017

Conversation

juhari
Copy link
Contributor

@juhari juhari commented Jan 18, 2017

When Hero is enabled, it sets itself as UINavigationControllerDelegate or UITabBarControllerDelegate. When Hero is disabled, it sets this delegate to nil. If there was a pre-existing delegate, it is now lost.

…ate or UITabBarControllerDelegate when enabled and disabled
@lkzhao
Copy link
Collaborator

lkzhao commented Jan 18, 2017

Nice!

@lkzhao lkzhao merged commit 7a06a82 into HeroTransitions:master Jan 18, 2017
@@ -117,6 +117,46 @@ internal extension NSObject{
}

public extension UIViewController{
private struct PreviousDelegates {
static var navigationDelegate: UINavigationControllerDelegate? = nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged too fast. Now I realized that this won't work. These two properties should be strings represent unique keys. Can you put another PR to fix this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct! I don't know what I was thinking. I'll post a PR for this right away.

lkzhao pushed a commit that referenced this pull request Feb 16, 2017
…ate or UITabBarControllerDelegate when enabled and disabled (#46)
lkzhao pushed a commit that referenced this pull request Feb 16, 2017
…ate or UITabBarControllerDelegate when enabled and disabled (#46)
lkzhao pushed a commit that referenced this pull request Jun 14, 2017
…ate or UITabBarControllerDelegate when enabled and disabled (#46)
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

Successfully merging this pull request may close these issues.

None yet

2 participants