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

Interactive Dismiss Animation #65

Open
felix-dumit opened this issue Feb 28, 2018 · 7 comments
Open

Interactive Dismiss Animation #65

felix-dumit opened this issue Feb 28, 2018 · 7 comments

Comments

@felix-dumit
Copy link
Contributor

Any plans to support an interactive dismiss animation, similar to how the Apple Music apps currently works?

Thanks for this library!

@HarshilShah
Copy link
Owner

It's been on my mind but I'm not certain about it. It's not entirely clear what velocity or progress is needed to ensure a swipe dismisses or cancels, and there's no way to indicate this.

Additionally, Apple Mail is also yet to adopt this new style, so I think I'm gonna wait a while to see if people are comfortable with it and it sticks, and implement it if it does.

@felix-dumit
Copy link
Contributor Author

felix-dumit commented Mar 2, 2018

Apple Mail does implement an interactive transition, I'm not sure what you meant by 'new style'.

In Apple Music, it looks like it doesn't look at velocity and there is just a certain threshold where if you swipe below that it will dismiss if you lift your finger.
But in Apple Mail, if you lift your finger anywhere it will always pop back up, and it will only "dismiss" if there's some velocity down.

So yeah there's definitely no consistency there. So if you were to implement it I guess the best bet would be to have configurable progress and velocity thresholds for dismissal. (Or some method in DeckTransitionViewControllerProtocol so each VC can have custom parameters)

@HarshilShah
Copy link
Owner

The new style I meant is the one implemented in Music in iOS 11.2 which calculates dismiss/cancel based on velocity and/or progress (and also animates the presenting view alongside the swipe); I presumed that's what you meant since before that Music didn't have an interactive dismiss.

Regarding configurable thresholds, I'm very hesitant about adding new customisation points, especially for something that should ideally be standard; it would be chaos if say every app had its own UINavigationController dismiss threshold. This would only exacerbate my current reservation about not communicating whether a dismiss or cancel will occur, so its probably off the table for good.

@felix-dumit
Copy link
Contributor Author

I just loaded up an iOS 10 device and I see your point now, this library currently works the same way as iOS 10 Apple Music.

And I totally understand your point regarding customization, but the way it is now where it is dismissed the iOS 10 way it is essentially adding another "standard".

How about leaving the dismissal as is for now, just making it so that when you're swiping down the background view scales based on percent dragged?

@Cookiezby
Copy link

Cookiezby commented Mar 7, 2018

I have try to make the apple music play bar transition demo by myself and I think that the dismiss animation may not be implemented by the UIPercentDrivenInteractiveTransition. It just looks like interactive. -> my demo https://github.com/Cookiezby/AppleMusicTransition

@HarshilShah
Copy link
Owner

@felix-dumit Good Idea! Seems like a nice middle ground

@Cookiezby That’s a good project!

Sent with GitHawk

@Cookiezby
Copy link

@HarshilShah Thanks, hope the project can give some inspiration :D

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

No branches or pull requests

3 participants