Class UIScreen

All Implemented Interfaces:
NSObjectProtocol, UITraitEnvironment, ObjCProtocol

public class UIScreen
extends NSObject
implements UITraitEnvironment
  • Constructor Details

  • Method Details

    • getScreens

      public static NSArray<UIScreen> getScreens()
    • getMainScreen

      public static UIScreen getMainScreen()
    • getBounds

      public CGRect getBounds()
    • getScale

      public double getScale()
    • getAvailableModes

      public NSArray<UIScreenMode> getAvailableModes()
    • getPreferredMode

      public UIScreenMode getPreferredMode()
    • getCurrentMode

      public UIScreenMode getCurrentMode()
    • setCurrentMode

      public void setCurrentMode​(UIScreenMode v)
    • getOverscanCompensation

      public UIScreenOverscanCompensation getOverscanCompensation()
    • setOverscanCompensation

      public void setOverscanCompensation​(UIScreenOverscanCompensation v)
    • getOverscanCompensationInsets

      public UIEdgeInsets getOverscanCompensationInsets()
      Since:
      Available in iOS 9.0 and later.
    • getMirroredScreen

      public UIScreen getMirroredScreen()
    • isCaptured

      public boolean isCaptured()
      Since:
      Available in iOS 11.0 and later.
    • getBrightness

      public double getBrightness()
    • setBrightness

      public void setBrightness​(double v)
    • wantsSoftwareDimming

      public boolean wantsSoftwareDimming()
    • setWantsSoftwareDimming

      public void setWantsSoftwareDimming​(boolean v)
    • getCoordinateSpace

      public UICoordinateSpace getCoordinateSpace()
    • getFixedCoordinateSpace

      public UICoordinateSpace getFixedCoordinateSpace()
    • getNativeBounds

      public CGRect getNativeBounds()
    • getNativeScale

      public double getNativeScale()
    • getMaximumFramesPerSecond

      public long getMaximumFramesPerSecond()
      Since:
      Available in iOS 10.3 and later.
    • getCalibratedLatency

      public double getCalibratedLatency()
      Since:
      Available in iOS 13.0 and later.
    • getFocusedItem

      @Deprecated public UIFocusItem getFocusedItem()
      Deprecated.
      Deprecated in iOS 15.0. Use -[UIWindowScene focusSystem].focusedItem instead
      Since:
      Available in iOS 10.0 and later.
    • getFocusedView

      @Deprecated public UIView getFocusedView()
      Deprecated.
      Deprecated in iOS 15.0. Use -[UIWindowScene focusSystem].focusedItem instead
      Since:
      Available in iOS 9.0 and later.
    • supportsFocus

      @Deprecated public boolean supportsFocus()
      Deprecated.
      Deprecated in iOS 15.0. Use -[UIWindowScene focusSystem] != nil instead
      Since:
      Available in iOS 9.0 and later.
    • getApplicationFrame

      @Deprecated public CGRect getApplicationFrame()
      Deprecated.
      Deprecated in iOS 9.0. Use bounds
    • getTraitCollection

      public UITraitCollection getTraitCollection()
      Specified by:
      getTraitCollection in interface UITraitEnvironment
    • DidConnectNotification

      public static NSString DidConnectNotification()
    • DidDisconnectNotification

      public static NSString DidDisconnectNotification()
    • ModeDidChangeNotification

      public static NSString ModeDidChangeNotification()
    • BrightnessDidChangeNotification

      public static NSString BrightnessDidChangeNotification()
    • CapturedDidChangeNotification

      public static NSString CapturedDidChangeNotification()
      Since:
      Available in iOS 11.0 and later.
    • getDisplayLink

      public CADisplayLink getDisplayLink​(NSObject target, Selector sel)
    • snapshotView

      public UIView snapshotView​(boolean afterUpdates)
    • traitCollectionDidChange

      public void traitCollectionDidChange​(UITraitCollection previousTraitCollection)
      Specified by:
      traitCollectionDidChange in interface UITraitEnvironment