Change disappear animation to fade out
Hi,
I love this project however the disappearing animation does not suit my app. I need to change it to something like a fade out (or something else really). I could'n find any way to achieve this. Please help (Some example code would be appreciated)
Hi @VSG24,
currently is not possible to change the animation, but is a good improvement for a next version.
If you think you have a valid and dynamic solution, implement it and open a pull request, please. Otherwise, you can fork the project and implement your fade out animation.
Thanks -Paolo
Thanks for your response. I want to fork the project and change the animation myself but I'm not sure where the code for anination exists. Can you point me to the right direction?
Hi @VSG24 and sorry for the delay!
There is a method called animateDismissWithGravity where you can change the animation! Consider that currently PMAlertController use UIDynamicAnimator, but you can use whatever you want.
If you can make the animation system generic, you can open a pull request. Otherwise, you can point your project to your fork.
Thanks
- Paolo
Hello, if someone wants to disable the gravity animation do
let alertVC = PMAlertController(title: "Options", description: nil, image: nil, style: .alert)
alertVC.gravityDismissAnimation = false // this here