Remove an existing UIAlertViews when invalidating the RCTAlertManager
Reviewed By: @nicklockwood Differential Revision: D2456795
This commit is contained in:
parent
f5409c1a51
commit
4af2501e8e
|
@ -10,7 +10,8 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTInvalidating.h"
|
||||
|
||||
@interface RCTAlertManager : NSObject <RCTBridgeModule>
|
||||
@interface RCTAlertManager : NSObject <RCTBridgeModule, RCTInvalidating>
|
||||
|
||||
@end
|
||||
|
|
|
@ -40,6 +40,13 @@ RCT_EXPORT_MODULE()
|
|||
return dispatch_get_main_queue();
|
||||
}
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
for (UIAlertView *alert in _alerts) {
|
||||
[alert dismissWithClickedButtonIndex:0 animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {NSDictionary} args Dictionary of the form
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue