FWScreenClassWrapper

@interface FWScreenClassWrapper : FWClassWrapper

Undocumented

FWAdaptive

  • 屏幕尺寸

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize screenSize;
  • 屏幕宽度

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat screenWidth;
  • 屏幕高度

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat screenHeight;
  • 屏幕像素比例

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat screenScale;
  • 是否是指定英寸屏幕

    Declaration

    Objective-C

    - (BOOL)isScreenInch:(FWScreenInch)inch;
  • 是否是全面屏屏幕

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isNotchedScreen;
  • 获取一像素的大小

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat pixelOne;
  • 检查是否含有安全区域,可用来判断iPhoneX

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL hasSafeAreaInsets;
  • 获取安全区域距离

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIEdgeInsets safeAreaInsets;
  • 状态栏高度,与是否隐藏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat statusBarHeight;
  • 导航栏高度,与是否隐藏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat navigationBarHeight;
  • 顶部栏高度,包含状态栏、导航栏,与是否隐藏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat topBarHeight;
  • 标签栏高度,与是否隐藏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat tabBarHeight;
  • 工具栏高度,与是否隐藏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat toolBarHeight;
  • 指定等比例缩放参考设计图尺寸,默认{375,812},宽度常用

    Declaration

    Objective-C

    @property (nonatomic) CGSize referenceSize;
  • 获取当前屏幕宽度缩放比例,宽度常用

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat relativeScale;
  • 获取当前屏幕高度缩放比例,高度不常用

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat relativeHeightScale;
  • 获取相对设计图宽度等比例缩放值

    Declaration

    Objective-C

    - (CGFloat)relativeValue:(CGFloat)value;
  • 获取相对设计图高度等比例缩放值

    Declaration

    Objective-C

    - (CGFloat)relativeHeight:(CGFloat)value;