NSMutableAttributedString+RYText.h 776 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // NSMutableAttributedString+RYText.h
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2024/1/6.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <CoreText/CoreText.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface NSMutableAttributedString (RYText)
  11. @property (nullable, nonatomic, strong, readwrite) UIFont *font;
  12. - (void)setFont:(nullable UIFont *)font range:(NSRange)range;
  13. @property (nullable, nonatomic, strong, readwrite) UIColor *color;
  14. - (void)setColor:(nullable UIColor *)color range:(NSRange)range;
  15. @property (nonatomic, readwrite) NSUnderlineStyle underlineStyle;
  16. - (void)setUnderlineStyle:(NSUnderlineStyle)underlineStyle range:(NSRange)range;
  17. - (void)setAttributes:(NSDictionary *)attributes;
  18. - (void)setAttribute:(NSString *)name value:(id)value;
  19. @end
  20. NS_ASSUME_NONNULL_END