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

OverCurrentContext Support. #37

Closed
lkzhao opened this issue Jan 10, 2017 · 5 comments
Closed

OverCurrentContext Support. #37

lkzhao opened this issue Jan 10, 2017 · 5 comments
Milestone

Comments

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 10, 2017

Hero doesn't have support for these modal presentation styles yet. Would be a bit tricky to implement since Hero needs to keep track of the presented view controllers.

Related to #34 #26

@fruitcoder
Copy link
Contributor

Could you point out how the community could help you with this issue? I love your framework but for context transitions it's sometimes necessary to show "where you come from", because it's better to understand the context. Isn't it sufficient to store a snapshot of the presenting view controller instead of a pointer to it?

@lkzhao
Copy link
Collaborator Author

lkzhao commented Feb 7, 2017

@fruitcoder Yes, we can start working on this now. For the past few week I have been trying to clean up the existing API and drop the zPosition modifier that was needed to make Hero transitions.

About your suggestion with keeping a snapshot of the presentingVC. The problem is that it doesn't work when the screen rotates on the presented VC. Ideally the presentingVC should also rotate and re-layout its subviews.

There are 2 problems to be solved:

  1. Hero currently doesn't store any state information after the transition. This makes it far easy to debug and also make view controller transitions independent. You can transition from any VC to any other VC without knowing which VC presented what. Many of the navigation helpers like hero_replaceViewController & hero_unwindToViewController depend on this.

  2. The snapshots that Hero takes have to stay after the transition. Theses snapshots are in a container view during the transition. Which VC should we insert these snapshot into? Who should keep track of them? Any still, when the screen rotates, these snapshots won't be updated.

I am also not very familiar with UIPresentationController. I have to spend some time on that and see if that is something we can use to maintain state information.

@lkzhao
Copy link
Collaborator Author

lkzhao commented Feb 12, 2017

.overFullScreen support is implemented in 0.3.0

@lkzhao lkzhao changed the title OverFullScreen & OverCurrentContext Support. OverCurrentContext Support. Feb 12, 2017
@lkzhao lkzhao added this to the v1.0 milestone Feb 12, 2017
@lkzhao lkzhao closed this as completed Mar 9, 2017
@fuxlud
Copy link

fuxlud commented Aug 15, 2018

Thank a lot for this amazing library!

This issue is still happening to me - I can still see black background when transition finished.


       let vc = MyViewController(...)
        vc.hero.isEnabled = true
        vc.hero.modalAnimationType = .selectBy(presenting: .pull(direction: .left), dismissing: .pull(direction: .right))
        vc.modalPresentationStyle = .overCurrentContext
        vc.view.backgroundColor = .clear
        present(vc2, animated: true, completion: nil)

When I set animated property to false present(vc2, animated: false, completion: nil) the background is transperent, but then I do not see the transition

@szoszig
Copy link

szoszig commented Nov 15, 2019

Any news on this?

@HeroTransitions HeroTransitions locked as resolved and limited conversation to collaborators Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants