From 83b9d5c682b21d88133f24da0f94dd56bd79e687 Mon Sep 17 00:00:00 2001
From: 单军华
Date: Thu, 19 Jul 2018 13:38:55 +0800
Subject: [PATCH] change
---
screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Views/conversation/MessageCell/EaseCustomMessageCell.m | 89 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Views/conversation/MessageCell/EaseCustomMessageCell.m b/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Views/conversation/MessageCell/EaseCustomMessageCell.m
new file mode 100755
index 0000000..ea0d573
--- /dev/null
+++ b/screendisplay/Pods/EaseUI/EaseUI/EMUIKit/Views/conversation/MessageCell/EaseCustomMessageCell.m
@@ -0,0 +1,89 @@
+/************************************************************
+ * * Hyphenate CONFIDENTIAL
+ * __________________
+ * Copyright (C) 2016 Hyphenate Inc. All rights reserved.
+ *
+ * NOTICE: All information contained herein is, and remains
+ * the property of Hyphenate Technologies.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Hyphenate Inc.
+ */
+
+#import "EaseCustomMessageCell.h"
+#import "EaseBubbleView+Gif.h"
+#import "UIImageView+WebCache.h"
+#import "UIImage+GIF.h"
+#import "IMessageModel.h"
+
+@interface EaseCustomMessageCell ()
+
+@end
+
+@implementation EaseCustomMessageCell
+
++ (void)initialize
+{
+ // UIAppearance Proxy Defaults
+}
+
+#pragma mark - IModelCell
+
+- (BOOL)isCustomBubbleView:(id<IMessageModel>)model
+{
+ return YES;
+}
+
+- (void)setCustomModel:(id<IMessageModel>)model
+{
+ UIImage *image = model.image;
+ if (!image) {
+ [self.bubbleView.imageView sd_setImageWithURL:[NSURL URLWithString:model.fileURLPath] placeholderImage:[UIImage imageNamed:model.failImageName]];
+ } else {
+ _bubbleView.imageView.image = image;
+ }
+
+ if (model.avatarURLPath) {
+ [self.avatarView sd_setImageWithURL:[NSURL URLWithString:model.avatarURLPath] placeholderImage:model.avatarImage];
+ } else {
+ self.avatarView.image = model.avatarImage;
+ }
+}
+
+- (void)setCustomBubbleView:(id<IMessageModel>)model
+{
+ [_bubbleView setupGifBubbleView];
+
+ _bubbleView.imageView.image = [UIImage imageNamed:@"imageDownloadFail"];
+}
+
+- (void)updateCustomBubbleViewMargin:(UIEdgeInsets)bubbleMargin model:(id<IMessageModel>)model
+{
+ [_bubbleView updateGifMargin:bubbleMargin];
+}
+
+/*!
+ @method
+ @brief ������cell���������������
+ @discussion
+ @param model ������model
+ @return ������cell���������������
+ */
++ (NSString *)cellIdentifierWithModel:(id<IMessageModel>)model
+{
+ return model.isSender?@"EaseMessageCellSendGif":@"EaseMessageCellRecvGif";
+}
+
+/*!
+ @method
+ @brief ������cell���������
+ @discussion
+ @param model ������model
+ @return ������cell���������
+ */
++ (CGFloat)cellHeightWithModel:(id<IMessageModel>)model
+{
+ return 100;
+}
+
+@end
--
Gitblit v1.8.0