UIFont(FWToolkit)
@interface UIFont (FWToolkit)
/// 全局自定义字体句柄,优先调用
@property (class, nonatomic, copy, nullable) UIFont * (^fw_fontBlock)(CGFloat size, UIFontWeight weight) NS_REFINED_FOR_SWIFT;
/// 是否自动等比例缩放字体,默认NO。启用后所有fw字体size都会自动*relativeScale
@property (class, nonatomic, assign) BOOL fw_autoScale NS_REFINED_FOR_SWIFT;
/// 返回系统Thin字体
+ (UIFont *)fw_thinFontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 返回系统Light字体
+ (UIFont *)fw_lightFontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 返回系统Regular字体
+ (UIFont *)fw_fontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 返回系统Medium字体
+ (UIFont *)fw_mediumFontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 返回系统Semibold字体
+ (UIFont *)fw_semiboldFontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 返回系统Bold字体
+ (UIFont *)fw_boldFontOfSize:(CGFloat)size NS_REFINED_FOR_SWIFT;
/// 创建指定尺寸和weight的系统字体
+ (UIFont *)fw_fontOfSize:(CGFloat)size weight:(UIFontWeight)weight NS_REFINED_FOR_SWIFT;
@end
Undocumented
-
全局自定义字体句柄,优先调用
Declaration
Objective-C
@property (class, nonatomic, copy, nullable) UIFont *_Nonnull (^) (CGFloat, UIFontWeight) fw_fontBlock;
-
是否自动等比例缩放字体,默认NO。启用后所有fw字体size都会自动*relativeScale
Declaration
Objective-C
@property (class, nonatomic) BOOL fw_autoScale;
-
返回系统Thin字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_thinFontOfSize:(CGFloat)size;
-
返回系统Light字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_lightFontOfSize:(CGFloat)size;
-
返回系统Regular字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_fontOfSize:(CGFloat)size;
-
返回系统Medium字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_mediumFontOfSize:(CGFloat)size;
-
返回系统Semibold字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_semiboldFontOfSize:(CGFloat)size;
-
返回系统Bold字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_boldFontOfSize:(CGFloat)size;
-
创建指定尺寸和weight的系统字体
Declaration
Objective-C
+ (nonnull UIFont *)fw_fontOfSize:(CGFloat)size weight:(UIFontWeight)weight;