BastiaanJansen / toast-swift

Customizable Swift Toast view built with UIKit. 🍞
MIT License
489 stars 77 forks source link

Support animation type #24

Closed Nikoloutsos closed 1 year ago

Nikoloutsos commented 1 year ago

Thinking of making a PR that will give the ability to choose the toast entering/exiting animation.

let config = ToastConfiguration(
    direction: .up,
    autoHide: true,
    enablePanToClose: true,
    displayTime: 5,
    animationTime: 0.2
+   animationType: .slide 
)

also fade animation type can be an option.

What do you think 🤔

BastiaanJansen commented 1 year ago

That would be cool. Although I do think the user should also be able to provide their own animation, but can also choose between a couple of already built-in animations.

I say go for it!

BastiaanJansen commented 1 year ago

Thanks @Nikoloutsos! Released in version 1.3.0.