38 lines
818 B
C
38 lines
818 B
C
|
|
//
|
||
|
|
// RichTextLabel.h
|
||
|
|
// BabyAlbum
|
||
|
|
//
|
||
|
|
// Created by mambaxie on 2021/7/3.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import <YYText/YYText.h>
|
||
|
|
#import "PickerButton.h"
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
|
||
|
|
@interface RichLabelItem : NSObject
|
||
|
|
|
||
|
|
@property (nonatomic, copy) NSString *title;
|
||
|
|
|
||
|
|
@property (nonatomic, strong) void(^action)(void);
|
||
|
|
|
||
|
|
+ (instancetype)itemWithText:(NSString *)text action:(void(^)(void))action;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface RichTextLabel : YYLabel
|
||
|
|
|
||
|
|
+ (instancetype)richTextFullString:(NSString *)fullString items:(NSArray<RichLabelItem *> *)items maxWidth:(CGFloat)maxWidth;
|
||
|
|
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface RichLabel : UILabel
|
||
|
|
|
||
|
|
+ (instancetype)richTextWithFullString:(NSString *)fullString textColor:(UIColor *)textColor font:(UIFont *)font;
|
||
|
|
|
||
|
|
- (void)setRichTextWithText:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font;
|
||
|
|
@end
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_END
|