2026-02-03 15:53:07 +08:00
|
|
|
|
//
|
|
|
|
|
|
// KBChatMessageActionPopView.h
|
|
|
|
|
|
// keyBoard
|
|
|
|
|
|
//
|
|
|
|
|
|
// Created by Codex on 2026/2/3.
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, KBChatMessageActionType) {
|
|
|
|
|
|
KBChatMessageActionTypeCopy = 0,
|
|
|
|
|
|
KBChatMessageActionTypeDelete = 1,
|
|
|
|
|
|
KBChatMessageActionTypeReport = 2,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@class KBChatMessageActionPopView;
|
|
|
|
|
|
|
|
|
|
|
|
@protocol KBChatMessageActionPopViewDelegate <NSObject>
|
|
|
|
|
|
@optional
|
|
|
|
|
|
- (void)chatMessageActionPopView:(KBChatMessageActionPopView *)view
|
|
|
|
|
|
didSelectAction:(KBChatMessageActionType)action;
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
/// 聊天消息长按操作弹窗(Copy / Delete / Report)
|
|
|
|
|
|
@interface KBChatMessageActionPopView : UIView
|
|
|
|
|
|
|
|
|
|
|
|
@property (nonatomic, weak) id<KBChatMessageActionPopViewDelegate> delegate;
|
|
|
|
|
|
|
2026-02-04 18:39:25 +08:00
|
|
|
|
/// 是否显示 “Report” 操作(默认 YES)。
|
|
|
|
|
|
/// - 当长按的是右侧用户消息(KBChatUserMessageCell)时,可设置为 NO。
|
|
|
|
|
|
@property (nonatomic, assign) BOOL showsReportAction;
|
|
|
|
|
|
|
|
|
|
|
|
/// 根据是否显示 Report 计算推荐高度
|
|
|
|
|
|
+ (CGFloat)preferredHeightWithShowsReportAction:(BOOL)showsReportAction;
|
|
|
|
|
|
|
2026-02-03 15:53:07 +08:00
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|