123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- //
- // UIFont+RQExtension.m
- // RQCommon
- //
- // Created by 张嵘 on 2018/11/16.
- // Copyright © 2018 张嵘. All rights reserved.
- //
- /**
- *
- (
- "PingFangSC-Ultralight",
- "PingFangSC-Regular",
- "PingFangSC-Semibold",
- "PingFangSC-Thin",
- "PingFangSC-Light",
- "PingFangSC-Medium"
- )
- */
- /**
- * 极细体
- */
- static NSString *const RQPingFangSC_Ultralight = @"PingFangSC-Ultralight";
- /**
- * 常规体
- */
- static NSString *const RQPingFangSC_Regular = @"PingFangSC-Regular";
- /**
- * 中粗体
- */
- static NSString *const RQPingFangSC_Semibold = @"PingFangSC-Semibold";
- /**
- * 纤细体
- */
- static NSString *const RQPingFangSC_Thin = @"PingFangSC-Thin";
- /**
- * 细体
- */
- static NSString *const RQPingFangSC_Light = @"PingFangSC-Light";
- /**
- * 中黑体
- */
- static NSString *const RQPingFangSC_Medium = @"PingFangSC-Medium";
- #import "UIFont+RQExtension.h"
- @implementation UIFont (RQExtension)
- /**
- * 苹方极细体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_UltralightFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Ultralight size:fontSize];
- }
- /**
- * 苹方常规体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_RegularFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Regular size:fontSize];
- }
- /**
- * 苹方中粗体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_SemiboldFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Semibold size:fontSize];
- }
- /**
- * 苹方纤细体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_ThinFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Thin size:fontSize];
- }
- /**
- * 苹方细体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_LightFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Light size:fontSize];
- }
- /**
- * 苹方中黑体
- *
- * @param fontSize 字体大小
- *
- */
- + (instancetype)rq_fontForPingFangSC_MediumFontOfSize:(CGFloat)fontSize {
- return [UIFont fontWithName:RQPingFangSC_Medium size:fontSize];
- }
- @end
|