Browse Source

detect Dark Mode

marinofaggiana 5 years ago
parent
commit
73ec6b3a0d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      iOSClient/Main/CCSplit.m

+ 8 - 0
iOSClient/Main/CCSplit.m

@@ -280,6 +280,14 @@
     // simply create a property of 'BOOL' type
     BOOL isRunningInFullScreen = CGRectEqualToRect([UIApplication sharedApplication].delegate.window.frame, [UIApplication sharedApplication].delegate.window.screen.bounds);
     
+    // detect Dark Mode
+    if (@available(iOS 12.0, *)) {
+        UIUserInterfaceStyle interfaceStyle = self.traitCollection.userInterfaceStyle;
+        if (interfaceStyle == UIUserInterfaceStyleDark) {
+        } else {
+        }
+    }
+    
     prevRunningInFullScreen = isRunningInFullScreen;
     
     if (prevRunningInFullScreen == NO) {