Просмотр исходного кода

Adjust FLEX window level to stay below UIAlertViews

Ryan Olson лет назад: 12
Родитель
Сommit
754ced611a
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      Classes/Explorer Toolbar/FLEXWindow.m

+ 4 - 3
Classes/Explorer Toolbar/FLEXWindow.m

@@ -16,9 +16,10 @@
     if (self) {
         self.backgroundColor = [UIColor clearColor];
         // Some apps have windows at UIWindowLevelStatusBar + n.
-        // Using CGFLOAT_MAX works on 7.0 devieces but doesn't work in the 7.1 sim.
-        // Hopefully status bar level + 1000.0 gets the job done. It works in the 7.1 sim.
-        self.windowLevel = UIWindowLevelStatusBar + 1000.0;
+        // If we make the window level too high, we block out UIAlertViews.
+        // There's a balance between staying above the app's windows and staying below alerts.
+        // UIWindowLevelStatusBar + 100 seems to hit that balance.
+        self.windowLevel = UIWindowLevelStatusBar + 100.0;
     }
     return self;
 }