HarshilShah / DeckTransition

A library to recreate the iOS Apple Music now playing transition
MIT License
2.19k stars 168 forks source link

Integrated haptic feedback coordinated with transitions #99

Closed Tantalum73 closed 5 years ago

Tantalum73 commented 5 years ago

This pull requests integrates haptic feedback into the project. The feedback is coordinated alongside with the transitions. As the updated sample project shows, the points at which feedback should be provided are configured by calling transitionDelegate.useHapticFeedback(at: [.whenDismissing, .whenPresenting]).

In my experience, haptic feedback is a great way to provide context to what is going on on-screen. Even Overcast added force feedback for its v5.0 re-design. Prior to this pull request, one needed to coordinate haptic feedback by themselves in the viewWillAppear and viewWillDisappear methods of the presented ViewController. Now it is much easier to integrate it into the transition.

I would love to hear your thoughts on it! 🙂

HarshilShah commented 5 years ago

Hey there Andreas, thank you for this PR! This is some fantastic work!

Unfortunately I’m not going to be able to merge this in. Aside from haptics seeming orthogonal to the project’s scope here, especially with CoreHaptics in iOS 13 it seems like something that might require custom behaviour, and the view appearance methods you mentioned seem like the perfect place for anyone requiring them to opt in.