HeroTransitions / Hero

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

Request: Make HeroTransition::complete(after: TimeInterval, finishing: Bool) public #746

Open IainS1986 opened 1 year ago

IainS1986 commented 1 year ago

This isn't a bug, but a feature request.

Would it be possible to make the complete(after: TimeInterval, finishing: Bool) public instead of just complete(finishing: Bool)

The main use case I have is when using interactive transitions. If you have a transition thats interactive, and say you finish your gesture when the progress is up to 0.8 or at least there abouts, due to being so 'close' to the end, the animation sometimes feels like it 'snaps' to the finish.

Ideally, I'd like to dynamically alter the duration a bit and allow the animation to take longer to finish that final bit of progress than it would normally do when not interacting.

I tried applying a duration modifier when interacting, but I think totalDuration is only calculated at the start - so maybe the alternative to be able to recalc totalDuration on the fly?