123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- //
- // JXBaseChatCell.h
- // shiku_im
- //
- // Created by Apple on 16/10/11.
- // Copyright © 2016年 Reese. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "JXConnection.h"
- #import "JXMessageObject.h"
- #import "QBPopupMenuItem.h"
- #import "QBPlasticPopupMenu.h"
- #import "QCheckBox.h"
- @class JXEmoji;
- @class JXImageView;
- @class JXLabel;
- @class SCGIFImageView;
- @class JXBaseChatCell;
- @class FLAnimatedImageView;
- #define kSystemImageCellWidth (JX_SCREEN_WIDTH - 15 * 2 - CHAT_WIDTH_ICON-HEAD_SIZE)
- typedef enum : NSUInteger {
- CollectTypeDefult = 0,// 默认
- CollectTypeEmoji = 6,//表情
- CollectTypeImage = 1,//图片
- CollectTypeVideo = 2,//视频
- CollectTypeFile = 3,//文件
- CollectTypeVoice = 4,//语音
- CollectTypeText = 5,//文本
- } CollectType;
- @protocol JXChatCellDelegate <NSObject>
- // 长按复制
- - (void)chatCell:(JXBaseChatCell *)chatCell myCopyIndexNum:(int)indexNum;
- // 长按回复
- - (void)chatCell:(JXBaseChatCell *)chatCell replyIndexNum:(int)indexNum;
- // 长按删除
- - (void)chatCell:(JXBaseChatCell *)chatCell deleteIndexNum:(int)indexNum;
- // 长按转发
- - (void)chatCell:(JXBaseChatCell *)chatCell RelayIndexNum:(int)indexNum;
- // 长按收藏
- - (void)chatCell:(JXBaseChatCell *)chatCell favoritIndexNum:(int)indexNum type:(CollectType)collectType;
- // 长按撤回
- - (void)chatCell:(JXBaseChatCell *)chatCell withdrawIndexNum:(int)indexNum;
- // 开启、关闭多选
- - (void)chatCell:(JXBaseChatCell *)chatCell selectMoreIndexNum:(int)indexNum;
- // 多选,选择
- - (void)chatCell:(JXBaseChatCell *)chatCell checkBoxSelectIndexNum:(int)indexNum isSelect:(BOOL)isSelect;
- // 开始录制
- - (void)chatCell:(JXBaseChatCell *)chatCell startRecordIndexNum:(int)indexNum;
- // 结束录制
- - (void)chatCell:(JXBaseChatCell *)chatCell stopRecordIndexNum:(int)indexNum;
- // 重发消息
- - (void)chatCell:(JXBaseChatCell *)chatCell resendIndexNum:(int)indexNum;
- // 语音播放转换
- - (void)chatCell:(JXBaseChatCell *)chatCell audioPlayChangeIndexNum:(int)indexNum;
- // 语音播放转换
- - (void)chatCellHeadIMG:(JXMessageObject *)msgCell audioPlayChangeIndexNum:(NSInteger )indexNum;
- // 获取录制状态
- - (BOOL) getRecording;
- // 获取开始录制num
- - (NSInteger) getRecordStarNum;
- @end
- @interface JXBaseChatCell : UITableViewCell<LXActionSheetDelegate>
- @property (nonatomic,strong) UIImageView *bubbleBgImageView;
- @property (nonatomic,strong) UIButton * bubbleBg;
- @property (nonatomic,strong) UIButton * readImage;
- @property (nonatomic,strong) UILabel* tempChatL;
-
- @property (nonatomic,strong) JXImageView * burnImage;
- @property (nonatomic,strong) JXImageView * sendFailed;
- @property (nonatomic,strong) JXLabel * readView;
- @property (nonatomic,strong) JXLabel * readNum;
- @property (nonatomic,strong) UIActivityIndicatorView * wait;
- @property (nonatomic,strong) JXMessageObject * msg22;
- @property (nonatomic,strong) JXMessageObject * msg;
- @property (nonatomic,strong) UIImageView * headImage;
- @property (nonatomic,strong) UIImageView * cerImgView; // 认证图标
- @property (nonatomic,strong) UILabel* timeLabel;
- @property (nonatomic,strong) UILabel *nicknameLabel;
- @property (nonatomic,strong) UIImageView *gradeIcon; //群成员等级图标
- @property (nonatomic,strong) UIImageView *chujiIMG; //群成员等级图标
- @property (nonatomic,strong) UILabel *groupNameLabel; //群头衔
- @property (nonatomic,assign) BOOL isOpenIntegral; //是否开启群头衔
- @property (nonatomic,assign) SEL didTouch;
- @property (nonatomic,assign) int indexNum;
- @property (nonatomic, strong) QBPlasticPopupMenu *plasticPopupMenu;
- @property (nonatomic, strong) QBPopupMenu *popupMenu;
- @property (nonatomic, weak) id<JXChatCellDelegate>chatCellDelegate;
- @property (nonatomic, weak) NSObject* delegate;
- @property (nonatomic, assign) SEL readDele;
- @property (nonatomic, assign) BOOL isCourse;
- @property (nonatomic, assign) BOOL isShowRecordCourse;
- @property (nonatomic, assign) BOOL isShowHead;
- @property (nonatomic, assign) BOOL isWithdraw; // 是否显示撤回
- @property (nonatomic, assign) BOOL isSelectMore;
- @property (nonatomic, strong) QCheckBox *checkBox;
- @property (nonatomic, strong) roomData *room;
- @property (nonatomic, strong) NSArray *groupLevelNameArray;
- @property (nonatomic, assign) double loadProgress;
- @property (nonatomic, strong) NSString *fileDict;
- -(void)creatUI;
- -(void)drawIsRead;
- -(void)drawIsSend;
- -(void)drawIsReceive;
- - (void)drawReadPersons:(int)num;
- - (void)setBackgroundImage;
- - (void)setCellData;
- -(void)setHeaderImage;
- -(void)isShowSendTime;
- //-(void)downloadFile:(JXImageView*)iv;
- - (void)setMaskLayer:(UIImageView *)imageView;
- - (void)sendMessageToUser;
- - (void)setAgreeRefuseBtnStatusAfterReply; //回应交换电话后更新按钮状态(子类实现)
- - (void)updateFileLoadProgress;
- // 获取cell 高度
- + (float) getChatCellHeight:(JXMessageObject *)msg;
- - (void)drawReadDelView:(BOOL)isSelected;
- - (void)encodeWithCoder:(nonnull NSCoder *)coder;
- + (nonnull instancetype)appearance;
- + (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait;
- + (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedIn:(nullable Class<UIAppearanceContainer>)ContainerClass, ...;
- + (nonnull instancetype)appearanceWhenContainedIn:(nullable Class<UIAppearanceContainer>)ContainerClass, ...;
- - (void)traitCollectionDidChange:(nullable UITraitCollection *)previousTraitCollection;
- - (CGPoint)convertPoint:(CGPoint)point fromCoordinateSpace:(nonnull id<UICoordinateSpace>)coordinateSpace;
- - (CGPoint)convertPoint:(CGPoint)point toCoordinateSpace:(nonnull id<UICoordinateSpace>)coordinateSpace;
- - (CGRect)convertRect:(CGRect)rect fromCoordinateSpace:(nonnull id<UICoordinateSpace>)coordinateSpace;
- - (CGRect)convertRect:(CGRect)rect toCoordinateSpace:(nonnull id<UICoordinateSpace>)coordinateSpace;
- - (void)didUpdateFocusInContext:(nonnull UIFocusUpdateContext *)context withAnimationCoordinator:(nonnull UIFocusAnimationCoordinator *)coordinator;
- - (void)setNeedsFocusUpdate;
- - (BOOL)shouldUpdateFocusInContext:(nonnull UIFocusUpdateContext *)context;
- - (void)updateFocusIfNeeded;
- - (nonnull NSArray<id<UIFocusItem>> *)focusItemsInRect:(CGRect)rect;
- @end
|