HeroTransitions / Hero

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

HeroModifiers will fail when a nested `when` modifier exist #757

Open cloxnu opened 1 year ago

cloxnu commented 1 year ago
view.heroModifiers = [
    .when({ $0.isMatched && $0.matchedView?.alpha != 0 && $0.view.alpha != 0 }, [
        .forceNonFade,
        .when({ ($0.isAppearing && $0.isPresenting || !$0.isAppearing && !$0.isPresenting) }, .opacity(0)),
    ]),
]

Look at this, .opacity(0) will never be added.