From b21a2a8193b520c87b437e47d327d979e726bbc8 Mon Sep 17 00:00:00 2001 From: CodeST <694468528@qq.com> Date: Mon, 15 Dec 2025 15:03:35 +0800 Subject: [PATCH] 1 --- CustomKeyboard/View/KBEmojiPanelView.m | 39 ++++++++++--------- .../Class/Pay/M/IAPVerifyTransactionObj.m | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CustomKeyboard/View/KBEmojiPanelView.m b/CustomKeyboard/View/KBEmojiPanelView.m index 086687c..55a6055 100644 --- a/CustomKeyboard/View/KBEmojiPanelView.m +++ b/CustomKeyboard/View/KBEmojiPanelView.m @@ -54,7 +54,7 @@ @property (nonatomic, strong) UIView *bottomBar; @property (nonatomic, strong) UIScrollView *tabScrollView; @property (nonatomic, strong) UIStackView *tabStackView; -@property (nonatomic, strong) UIButton *searchButton; +//@property (nonatomic, strong) UIButton *searchButton; @property (nonatomic, strong) NSArray *tabButtons; @property (nonatomic, strong) KBEmojiDataProvider *dataProvider; @property (nonatomic, copy) NSArray *categories; @@ -135,13 +135,13 @@ self.bottomBar.backgroundColor = [UIColor clearColor]; [self addSubview:self.bottomBar]; - 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.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.tabScrollView = [[UIScrollView alloc] init]; self.tabScrollView.showsHorizontalScrollIndicator = NO; @@ -163,19 +163,20 @@ [self.bottomBar mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.bottom.equalTo(self); - make.height.mas_equalTo(72); - }]; - - [self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.equalTo(self.bottomBar.mas_right).offset(-16); - make.centerY.equalTo(self.bottomBar); - make.width.mas_equalTo(84); make.height.mas_equalTo(40); }]; +// [self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) { +// make.right.equalTo(self.bottomBar.mas_right).offset(-16); +// make.centerY.equalTo(self.bottomBar); +// make.width.mas_equalTo(84); +// make.height.mas_equalTo(40); +// }]; + [self.tabScrollView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.bottomBar.mas_left).offset(12); - make.right.equalTo(self.searchButton.mas_left).offset(-12); +// make.right.equalTo(self.searchButton.mas_left).offset(-12); + make.right.equalTo(self.bottomBar.mas_right).offset(-12); make.top.equalTo(self.bottomBar.mas_top).offset(8); make.bottom.equalTo(self.bottomBar.mas_bottom).offset(-8); }]; @@ -231,7 +232,7 @@ } NSMutableArray *buttons = [NSMutableArray arrayWithCapacity:self.categories.count]; [self.categories enumerateObjectsUsingBlock:^(KBEmojiCategory * _Nonnull cat, NSUInteger idx, BOOL * _Nonnull stop) { - UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem]; + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.tag = idx; btn.layer.cornerRadius = 16; btn.layer.masksToBounds = YES; @@ -319,7 +320,7 @@ } - (void)onLocalizationChanged { - [self.searchButton setTitle:KBLocalized(@"Search") forState:UIControlStateNormal]; +// [self.searchButton setTitle:KBLocalized(@"Search") forState:UIControlStateNormal]; [self reloadData]; } @@ -331,7 +332,7 @@ 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.searchButton.backgroundColor = searchColor; self.tabNormalColor = [UIColor colorWithWhite:1 alpha:0.08]; self.tabSelectedColor = theme.accentColor ?: [UIColor colorWithWhite:1 alpha:0.25]; [self updateTabHighlightStates]; diff --git a/keyBoard/Class/Pay/M/IAPVerifyTransactionObj.m b/keyBoard/Class/Pay/M/IAPVerifyTransactionObj.m index 643d605..8126ded 100644 --- a/keyBoard/Class/Pay/M/IAPVerifyTransactionObj.m +++ b/keyBoard/Class/Pay/M/IAPVerifyTransactionObj.m @@ -40,7 +40,7 @@ NSDictionary *params = @{ @"receipt": receipt ?: @""}; __weak typeof(self) weakSelf = self; [self.payVM applePayReqWithParams:params needShow:NO completion:^(NSInteger sta, NSString * _Nullable msg) { - [KBHUD dismiss]; +// [KBHUD dismiss]; [KBHUD showInfo:(sta == !KBBizCodeSuccess ? KBLocalized(@"Payment failed") : KBLocalized(@"Payment successful"))]; if (sta == KBBizCodeSuccess) { [[SKPaymentQueue defaultQueue] finishTransaction:transaction];