   
   /// A boolean indicating if the device is in Landscape mode.
   public static var isLandscape: Bool {
-    return UIApplication.shared.statusBarOrientation.isLandscape
+    return Application.shared.statusBarOrientation.isLandscape
   }
   
   /// A boolean indicating if the device is in Portrait mode.

  
  /// The current UIInterfaceOrientation value.
  public static var orientation: UIInterfaceOrientation {
    return UIApplication.shared.statusBarOrientation
  }
  
  /// Retrieves the device status bar style.
  public static var statusBarStyle: UIStatusBarStyle {
    get {
      return UIApplication.shared.statusBarStyle
    }
    set(value) {
      UIApplication.shared.statusBarStyle = value
    }
  }
  
  /// Retrieves the device status bar hidden state.
  public static var isStatusBarHidden: Bool {
    get {
      return UIApplication.shared.isStatusBarHidden
    }
    set(value) {
      UIApplication.shared.isStatusBarHidden = value
    }
  }
  

import UIKit

public struct Application {
    
  public static var shared: UIApplication {
    let sharedSelector = NSSelectorFromString("sharedApplication")
    guard UIApplication.responds(to: sharedSelector) else {
      fatalError("[Material: Extensions cannot access Application]")
    }
    
    let shared = UIApplication.perform(sharedSelector)
    return shared?.takeUnretainedValue() as! UIApplication
  }
    
  /// An optional reference to the main UIWindow.
  public static var keyWindow: UIWindow? {
    return Application.shared.keyWindow
  }
  
  /// An optional reference to the top most view controller.
