HeroTransitions / Hero

Elegant transition library for iOS & tvOS
https://HeroTransitions.github.io/Hero/
MIT License
22.02k stars 1.72k forks source link

how to disable hero transition for navigationcontroller ? #666

Closed imnayandave closed 3 years ago

imnayandave commented 4 years ago

What did you do?

I wanted Transition animation for PUSH and POP for only 2 ViewControllers from many. So , I did this on FirstVC(from which PUSH Transition I Wanted) self.navigationController!.hero.isEnabled = true

and it worked from that

But for now every other ViewController , same Hero transition animation is happening which is UNWANTED

I want the default Navigation Transition for other ViewControllers .. HELP !! Thanks

Mohit-Allay commented 3 years ago

Hey @imnayandave Did you find any solution or work around ?

brenovaladao commented 3 years ago

Did you find any solution? I'd like to know as well @imnayandave

JoeMatt commented 3 years ago

If every VC shares the same nav controller then this makes sense.

Each VC will have to disable / re-enable hero in the pre and post push/pop methods. Probably in your prepareForTransition method.