48 lines
1.2 KiB
Objective-C
48 lines
1.2 KiB
Objective-C
//
|
|
// KBAIMessageCell.h
|
|
// keyBoard
|
|
//
|
|
// Created by Mac on 2026/1/28.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class KBAIMessageCell;
|
|
|
|
@protocol KBAIMessageCellDelegate <NSObject>
|
|
|
|
@optional
|
|
/// 点击删除按钮
|
|
- (void)messageCell:(KBAIMessageCell *)cell didTapDeleteAtIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
@end
|
|
|
|
@interface KBAIMessageCell : UITableViewCell
|
|
|
|
@property (nonatomic, weak) id<KBAIMessageCellDelegate> delegate;
|
|
@property (nonatomic, strong) NSIndexPath *indexPath;
|
|
|
|
/// 头像
|
|
@property (nonatomic, strong, readonly) UIImageView *avatarImageView;
|
|
/// 昵称
|
|
@property (nonatomic, strong, readonly) UILabel *nameLabel;
|
|
/// 消息内容
|
|
@property (nonatomic, strong, readonly) UILabel *contentLabel;
|
|
/// 时间
|
|
@property (nonatomic, strong, readonly) UILabel *timeLabel;
|
|
/// 置顶图标(只显示,不做功能)
|
|
@property (nonatomic, strong, readonly) UIImageView *pinIconView;
|
|
|
|
/// 配置数据
|
|
- (void)configWithAvatar:(NSString *)avatarUrl
|
|
name:(NSString *)name
|
|
content:(NSString *)content
|
|
time:(NSString *)time
|
|
isPinned:(BOOL)isPinned;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|