123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // YOUPAIZhaPianTextAttachment2.m
- // YOUQU
- //
- // Created by xiaohaoran on 2021/12/14.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAIZhaPianTextAttachment2.h"
- @implementation YOUPAIZhaPianTextAttachment2
- - (NSString *)encodeAttachment
- {
- NSDictionary *dict = @{
- CMType : @(CustomOnChatRoomHint),
- 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 @"YOUPAIZhaPianTextContentView2";
- }
- - (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
|