Port of SAConfettiView to Xamarin.Ios
It's raining confetti! SAConfettiView is the easiest way to add fun, multi-colored confetti to your application and make users feel rewarded. Written in csharp, SAConfettiView is a subclass of UIView and is highly customizable. From various types and colors of confetti to different levels of intensity, you can make the confetti as fancy as you want.
Available from Nuget
Creating a SAConfettiView is the same as creating a UIView:
ConfettiView = new ConfettiView(View.Bounds);
Don't forget to add the subview!
View.AddSubview(ConfettiView);
Pick one of the preconfigured types of confetti with the type
property, or create your own by providing a custom image. This property defaults to the Confetti
type.
confettiView.type = ConfettiType.Confetti;
confettiView.type = ConfettiType.Triangle;
confettiView.type = ConfettiType.Star;
confettiView.type = ConfettiType.Diamond;
The intensity refers to how many particles are generated and how quickly they fall. Set the intensity of the confetti with the .intensity
property by passing in a value between 0 and 1. The default intensity is 0.5.
confettiView.Intensity = 0.75;
To start the confetti, use
confettiView.StartConfetti();
To stop the confetti, use
confettiView.stopConfetti();
MIT