Global Variables

The following global variables are available globally.

UIApplication+FWAdaptive

  • 是否是调试模式

    Declaration

    Swift

    public let FWIsDebug: Bool

UIDevice+FWAdaptive

  • 是否是模拟器

    Declaration

    Swift

    public var FWIsSimulator: Bool { get }
  • 是否是iPhone设备

    Declaration

    Swift

    public var FWIsIphone: Bool { get }
  • 是否是iPad设备

    Declaration

    Swift

    public var FWIsIpad: Bool { get }
  • 是否是Mac设备

    Declaration

    Swift

    public var FWIsMac: Bool { get }
  • 界面是否横屏

    Declaration

    Swift

    public var FWIsLandscape: Bool { get }
  • 设备是否横屏,无论支不支持横屏

    Declaration

    Swift

    public var FWIsDeviceLandscape: Bool { get }
  • iOS系统版本

    Declaration

    Swift

    public var FWIosVersion: Double { get }
  • 设备尺寸,跟横竖屏无关

    Declaration

    Swift

    public var FWDeviceSize: CGSize { get }
  • 设备宽度,跟横竖屏无关

    Declaration

    Swift

    public var FWDeviceWidth: CGFloat { get }
  • 设备高度,跟横竖屏无关

    Declaration

    Swift

    public var FWDeviceHeight: CGFloat { get }
  • 设备分辨率,跟横竖屏无关

    Declaration

    Swift

    public var FWDeviceResolution: CGSize { get }

UIScreen+FWAdaptive

  • 屏幕尺寸

    Declaration

    Swift

    public var FWScreenSize: CGSize { get }
  • 屏幕宽度

    Declaration

    Swift

    public var FWScreenWidth: CGFloat { get }
  • 屏幕高度

    Declaration

    Swift

    public var FWScreenHeight: CGFloat { get }
  • 屏幕像素比例

    Declaration

    Swift

    public var FWScreenScale: CGFloat { get }
  • 是否是全面屏屏幕

    Declaration

    Swift

    public var FWIsNotchedScreen: Bool { get }
  • 屏幕一像素的大小

    Declaration

    Swift

    public var FWPixelOne: CGFloat { get }
  • 屏幕安全区域距离

    Declaration

    Swift

    public var FWSafeAreaInsets: UIEdgeInsets { get }
  • 状态栏高度,与是否隐藏无关

    Declaration

    Swift

    public var FWStatusBarHeight: CGFloat { get }
  • 导航栏高度,与是否隐藏无关

    Declaration

    Swift

    public var FWNavigationBarHeight: CGFloat { get }
  • 顶部栏高度,包含状态栏、导航栏,与是否隐藏无关

    Declaration

    Swift

    public var FWTopBarHeight: CGFloat { get }
  • 标签栏高度,与是否隐藏无关

    Declaration

    Swift

    public var FWTabBarHeight: CGFloat { get }
  • 工具栏高度,与是否隐藏无关

    Declaration

    Swift

    public var FWToolBarHeight: CGFloat { get }
  • 当前屏幕宽度缩放比例

    Declaration

    Swift

    public var FWRelativeScale: CGFloat { get }
  • 当前屏幕高度缩放比例

    Declaration

    Swift

    public var FWRelativeHeightScale: CGFloat { get }