@@ -86,7 +86,9 @@ @interface SIAlertView ()
8686@property (nonatomic , strong ) NSMutableArray *items;
8787@property (nonatomic , weak ) UIWindow *oldKeyWindow;
8888@property (nonatomic , strong ) UIWindow *alertWindow;
89- @property (nonatomic , assign ) UIViewTintAdjustmentMode oldTintAdjustmentMode NS_AVAILABLE_IOS (7_0);
89+ #ifdef __IPHONE_7_0
90+ @property (nonatomic , assign ) UIViewTintAdjustmentMode oldTintAdjustmentMode;
91+ #endif
9092@property (nonatomic , assign , getter = isVisible) BOOL visible;
9193
9294@property (nonatomic , strong ) UILabel *titleLabel;
@@ -388,10 +390,12 @@ - (void)show
388390 }
389391
390392 self.oldKeyWindow = [[UIApplication sharedApplication ] keyWindow ];
393+ #ifdef __IPHONE_7_0
391394 if ([self .oldKeyWindow respondsToSelector: @selector (setTintAdjustmentMode: )]) { // for iOS 7
392395 self.oldTintAdjustmentMode = self.oldKeyWindow .tintAdjustmentMode ;
393396 self.oldKeyWindow .tintAdjustmentMode = UIViewTintAdjustmentModeDimmed;
394397 }
398+ #endif
395399
396400 if (![[SIAlertView sharedQueue ] containsObject: self ]) {
397401 [[SIAlertView sharedQueue ] addObject: self ];
@@ -525,9 +529,11 @@ - (void)dismissAnimated:(BOOL)animated cleanup:(BOOL)cleanup
525529 }
526530
527531 UIWindow *window = self.oldKeyWindow ;
528- if ([window respondsToSelector: @selector (setTintAdjustmentMode: )]) { // for iOS 7
532+ #ifdef __IPHONE_7_0
533+ if ([window respondsToSelector: @selector (setTintAdjustmentMode: )]) {
529534 window.tintAdjustmentMode = self.oldTintAdjustmentMode ;
530535 }
536+ #endif
531537 if (!window) {
532538 window = [UIApplication sharedApplication ].windows [0 ];
533539 }
0 commit comments