File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939@interface SIAlertView ()
4040
4141@property (nonatomic , strong ) NSMutableArray *items;
42+ @property (nonatomic , strong ) UIWindow *oldKeyWindow;
4243@property (nonatomic , strong ) UIWindow *alertWindow;
4344@property (nonatomic , assign , getter = isVisible) BOOL visible;
4445
@@ -304,6 +305,8 @@ - (void)addButtonWithTitle:(NSString *)title type:(SIAlertViewButtonType)type ha
304305
305306- (void )show
306307{
308+ self.oldKeyWindow = [[UIApplication sharedApplication ] keyWindow ];
309+
307310 if (![[SIAlertView sharedQueue ] containsObject: self ]) {
308311 [[SIAlertView sharedQueue ] addObject: self ];
309312 }
@@ -438,6 +441,8 @@ - (void)dismissAnimated:(BOOL)animated cleanup:(BOOL)cleanup
438441 [SIAlertView hideBackgroundAnimated: YES ];
439442 }
440443 }
444+
445+ [self .oldKeyWindow makeKeyAndVisible ];
441446}
442447
443448#pragma mark - Transitions
You can’t perform that action at this time.
0 commit comments