123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // YOUPAIZhaPianTextAttachment.m
- // YOUQU
- //
- // Created by xiaohaoran on 2021/12/13.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAIZhaPianTextAttachment.h"
- @implementation YOUPAIZhaPianTextAttachment
- - (NSString *)encodeAttachment
- {
- NSDictionary *dict = @{
- CMType : @(CustomOnChatRoomFP),
- CMData : @{
- }
- };
- NSData *data = [NSJSONSerialization dataWithJSONObject:dict
- options:0
- error:nil];
- NSString *content = nil;
- if (data) {
- content = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding];
- }
- return content;
- }
- - (NSString *)cellContent:(NIMMessage *)message{
- return @"YOUPAIZhaPianTextContentView";
- }
- - (CGSize)contentSize:(NIMMessageModel *)model cellWidth:(CGFloat)width{
- CGFloat topTitleHeight =[@"贸然留外部联系方式可能有安全风险. 恶意留外部联系方式、引流,账号将会封禁, 请勿转账、谨防诈骗" heightWithFont:[UIFont systemFontOfSize:12] padding:3.0 constrainedToWidth:KScreenWidth-50.0f];
- CGFloat currentY = topTitleHeight+5.0f;
-
-
-
- return CGSizeMake(KScreenWidth, currentY);
- }
- - (UIEdgeInsets)contentViewInsets:(NIMMessage *)message
- {
- return UIEdgeInsetsZero;
-
- }
- @end
|