1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // XYRichText.h
- // Timi
- //
- // Created by gy on 2021/1/30.
- //
- #ifndef CGFLOAT_CEIL
- #ifdef CGFLOAT_IS_DOUBLE
- #define CGFLOAT_CEIL(value) ceil(value)
- #else
- #define CGFLOAT_CEIL(value) ceilf(value)
- #endif
- #endif
- #import <Foundation/Foundation.h>
- #import "AWRichText.h"
- NS_ASSUME_NONNULL_BEGIN
- @interface XYRichText : AWRichText
- /** 文字 */
- + (AWRTTextComponent *)getTextComponent:(NSString *)content color:(UIColor *)color font:(UIFont *)font padding:(NSInteger )padding;
- /** 设置本地图片 */
- + (AWRTImageComponent *)getImageComponent:(UIImage *)image font:(UIFont *)font padding:(NSInteger )padding;
- /** view需设置frame */
- + (AWRTViewComponent *)getViewComponent:(UIView *)view font:(UIFont *)font padding:(NSInteger )padding;
- /**获取AWRichText的富文本 */
- + (NSAttributedString *)getAbString:(AWRichText *)richTex andView:(UIView *)view;
- /** 获取AWRichText的富文本的size
- CGSizeMake(TTextMessageCell_Text_Width_Max, MAXFLOAT) 获取高
- */
- + (CGSize )getAbSize:(NSAttributedString *)AbString andRectSize:(CGSize )rectSize;
- /** 获取AWRichText的富文本的size
- CGSizeMake(KLiveRoomChatListCellWidth - 40, 0)].height; 获取高
- */
- + (CGSize )getRtSize:(AWRichText *)richText andRectSize:(CGSize )rectSize;
- @end
- NS_ASSUME_NONNULL_END
|