TKAlert supports tree predefined show/dismiss animations:
Animation Type | Figures |
---|---|
Fade | |
Scale | |
Slide |
The animated images above are just for illustration purposes. They are missing some fps quality because of the image processing software used to create these images. In order to get a real understanding of how the animations look and feel, check the Demo application that ships with the UI for iOS suite.
These animations can be applied when TKAlert is being shown or dismissed.
Those animations are applied when showing/dismissing the alert. You can add appear/hide animation by setting the appearAnimation
and hideAnimation
property of TKAlertStyle
:
alert.style.showAnimation = TKAlertAnimationScale;
alert.style.dismissAnimation = TKAlertAnimationScale;
alert.style.showAnimation = TKAlertAnimation.scale;
alert.style.dismissAnimation = TKAlertAnimation.scale;
alert.Style.ShowAnimation = TKAlertAnimation.Scale;
alert.Style.DismissAnimation = TKAlertAnimation.Scale;
TKAlert can recognize gestures. This allows end-users to dismiss the alert with a swipe or a tap gesture.
Enabling gesture recognition in TKAlert could be done as fallows:
_alert.dismissMode = TKAlertDismissModeTap;
alert.dismissMode = TKAlertDismissMode.tap
alert.DismissMode = TKAlertDismissMode.Tap;
Animations are controlled by setting properties of TKAlert
class. The animation duration is controlled by setting the animationDuration
property:
alert.animationDuration = 0.5;
alert.animationDuration = 0.5;
alert.AnimationDuration = 0.5f;