This commit is contained in:
2026-03-09 17:34:08 +08:00
parent c1ace5f53e
commit 0af7428353
55 changed files with 1630 additions and 665 deletions

View File

@@ -12,7 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol KBEmojiPanelViewDelegate <NSObject>
- (void)emojiPanelView:(KBEmojiPanelView *)panel didSelectEmoji:(NSString *)emoji;
- (void)emojiPanelViewDidRequestClose:(KBEmojiPanelView *)panel;
- (void)emojiPanelViewDidTapSearch:(KBEmojiPanelView *)panel;
@optional
- (void)emojiPanelViewDidTapDelete:(KBEmojiPanelView *)panel;
@end

View File

@@ -18,7 +18,6 @@
@property (nonatomic, strong) UIButton *backButton;
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) KBEmojiBottomBarView *bottomBar;
//@property (nonatomic, strong) UIButton *searchButton;
@property (nonatomic, strong) NSArray<UIButton *> *tabButtons;
@property (nonatomic, strong) KBEmojiDataProvider *dataProvider;
@property (nonatomic, copy) NSArray<KBEmojiCategory *> *categories;
@@ -100,14 +99,6 @@
[self addSubview:self.bottomBar];
[self.bottomBar.deleteButton addTarget:self action:@selector(onDelete) forControlEvents:UIControlEventTouchUpInside];
// self.searchButton = [UIButton buttonWithType:UIButtonTypeSystem];
// self.searchButton.layer.cornerRadius = 20;
// self.searchButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
// [self.searchButton setTitle:KBLocalized(@"Search") forState:UIControlStateNormal];
// [self.searchButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
// [self.searchButton addTarget:self action:@selector(onSearch) forControlEvents:UIControlEventTouchUpInside];
// [self.bottomBar addSubview:self.searchButton];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.mas_left).offset(12);
make.right.equalTo(self.mas_right).offset(-12);
@@ -269,12 +260,6 @@
}
}
- (void)onSearch {
if ([self.delegate respondsToSelector:@selector(emojiPanelViewDidTapSearch:)]) {
[self.delegate emojiPanelViewDidTapSearch:self];
}
}
- (void)onDelete {
if ([self.delegate respondsToSelector:@selector(emojiPanelViewDidTapDelete:)]) {
[self.delegate emojiPanelViewDidTapDelete:self];
@@ -303,7 +288,6 @@
}
- (void)onLocalizationChanged {
// [self.searchButton setTitle:KBLocalized(@"Search") forState:UIControlStateNormal];
[self reloadData];
}
@@ -314,8 +298,6 @@
self.backgroundColor = bg;
self.collectionView.backgroundColor = [UIColor clearColor];
self.titleLabel.textColor = theme.keyTextColor ?: [UIColor whiteColor];
UIColor *searchColor = theme.accentColor ?: [UIColor colorWithRed:0.35 green:0.35 blue:0.95 alpha:1];
// self.searchButton.backgroundColor = searchColor;
self.tabNormalColor = [UIColor colorWithWhite:1 alpha:0.08];
self.tabSelectedColor = theme.accentColor ?: [UIColor colorWithWhite:1 alpha:0.25];
[self updateTabHighlightStates];