UIScreen

class UIScreen : NSObject, UITraitEnvironment

This extesion adds some useful functions to UIScreen.

  • Check if current device has a Retina display.

    Declaration

    Swift

    public static func isRetina() -> Bool

    Return Value

    Returns true if it has a Retina display, otherwise false.

  • Check if current device has a Retina HD display.

    Declaration

    Swift

    public static func isRetinaHD() -> Bool

    Return Value

    Returns true if it has a Retina HD display, otherwise false.

  • Returns fixed screen size, based on device orientation.

    Declaration

    Swift

    public static func fixedScreenSize() -> CGSize

    Return Value

    Returns a GCSize with the fixed screen size.