34 lines
976 B
Objective-C
34 lines
976 B
Objective-C
//
|
|
// KBSearchSectionHeader.h
|
|
// keyBoard
|
|
//
|
|
// 通用区头:左侧标题,右侧可选垃圾桶按钮。
|
|
// 用于“历史搜索”和“推荐皮肤”两个 section。
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface KBSearchSectionHeader : UICollectionReusableView
|
|
|
|
/// 标题
|
|
@property (nonatomic, strong, readonly) UILabel *titleLabel;
|
|
/// 右侧垃圾桶按钮(仅历史搜索使用)
|
|
@property (nonatomic, strong, readonly) UIButton *trashButton;
|
|
|
|
/// 配置标题与是否显示垃圾桶
|
|
- (void)configWithTitle:(NSString *)title showTrash:(BOOL)showTrash;
|
|
|
|
/// 清除按钮点击回调(用户在弹窗中点击“确定”后触发)
|
|
@property (nonatomic, copy) void(^onTapTrash)(void);
|
|
|
|
/// “确定”按钮颜色(默认黑色)
|
|
@property (nonatomic, strong, nullable) UIColor *confirmColor;
|
|
/// “取消”按钮颜色(默认黑色)
|
|
@property (nonatomic, strong, nullable) UIColor *cancelColor;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|