You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
3.6 KiB

2 years ago
//
// XHMessageTableViewCell.h
// MessageDisplayExample
//
// Created by HUAJIE-1 on 14-4-24.
// Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XHBaseTableViewCell.h"
#import "XHConfigurationHelper.h"
#import "XHMessageBubbleView.h"
#import "UIView+XHRemoteImage.h"
#import "LKBadgeView.h"
@class XHMessageTableViewCell;
@protocol XHMessageTableViewCellDelegate <NSObject>
@optional
/**
*
*
* @param message Model
* @param indexPath IndexPath里面
* @param messageTableViewCell Cell上
*/
- (void)multiMediaMessageDidSelectedOnMessage:(id <XHMessageModel>)message atIndexPath:(NSIndexPath *)indexPath onMessageTableViewCell:(XHMessageTableViewCell *)messageTableViewCell;
/**
*
*
* @param message Model
* @param indexPath IndexPath里面
*/
- (void)didDoubleSelectedOnTextMessage:(id <XHMessageModel>)message atIndexPath:(NSIndexPath *)indexPath;
/**
*
*
* @param indexPath IndexPath里面
*/
- (void)didSelectedAvatarOnMessage:(id <XHMessageModel>)message atIndexPath:(NSIndexPath *)indexPath;
/**
* Menu Control Selected Item
*
* @param bubbleMessageMenuSelecteType item后
*/
- (void)menuDidSelectedAtBubbleMessageMenuSelecteType:(XHBubbleMessageMenuSelecteType)bubbleMessageMenuSelecteType;
@end
@interface XHMessageTableViewCell : XHBaseTableViewCell
@property (nonatomic, weak) id <XHMessageTableViewCellDelegate> delegate;
/**
* View
*/
@property (nonatomic, weak, readonly) XHMessageBubbleView *messageBubbleView;
/**
*
*/
@property (nonatomic, weak, readonly) UIButton *avatarButton;
/**
*
*/
@property (nonatomic, weak, readonly) UILabel *userNameLabel;
/**
* Label
*/
@property (nonatomic, weak, readonly) LKBadgeView *timestampLabel;
/**
* Cell所在的位置Cell delegate回调
*/
@property (nonatomic, strong) NSIndexPath *indexPath;
/**
*
*
* @return
*/
- (XHBubbleMessageType)bubbleMessageType;
/**
* Cell的方法
*
* @param message Model
* @param displayTimestamp Label
* @param cellIdentifier Cell的标识
*
* @return Cell对象
*/
- (instancetype)initWithMessage:(id <XHMessageModel>)message
displaysTimestamp:(BOOL)displayTimestamp
reuseIdentifier:(NSString *)cellIdentifier;
/**
* Model配置Cell的显示内容
*
* @param message Model
* @param displayTimestamp Label
*/
- (void)configureCellWithMessage:(id <XHMessageModel>)message
displaysTimestamp:(BOOL)displayTimestamp;
/**
* Model计算Cell的高度
*
* @param message Model
* @param displayTimestamp Label
*
* @return Cell所需要的高度
*/
+ (CGFloat)calculateCellHeightWithMessage:(id <XHMessageModel>)message
displaysTimestamp:(BOOL)displayTimestamp;
@end