We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6c1c89 + 654dccb commit 218832bCopy full SHA for 218832b
src/ios/Toast+UIView.m
@@ -46,6 +46,8 @@
46
static const NSString * CSToastTimerKey = @"CSToastTimerKey";
47
static const NSString * CSToastActivityViewKey = @"CSToastActivityViewKey";
48
49
+static UIView *prevToast = NULL;
50
+
51
@interface UIView (ToastPrivate)
52
53
- (void)hideToast:(UIView *)toast;
@@ -91,6 +93,10 @@ - (void)showToast:(UIView *)toast {
91
93
}
92
94
95
- (void)showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)point {
96
+ if(prevToast){
97
+ [self hideToast:prevToast];
98
+ }
99
+ prevToast = toast;
100
toast.center = [self centerPointForPosition:point withToast:toast];
101
toast.alpha = 0.0;
102
0 commit comments