From 3cce473244316ff345717c5e37297455c39ce251 Mon Sep 17 00:00:00 2001 From: liyuhua <15626451870@163.com> Date: Wed, 20 Sep 2023 18:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/CandyTree/View/XPCandyTreeBuyView.m | 11 +++++++++++ .../View/View/XPTreasureFairyBottomView.m | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeBuyView.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeBuyView.m index bab7f263..4ae54d12 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeBuyView.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeBuyView.m @@ -114,12 +114,22 @@ textField.text = @"1"; } self.chooseNum = textField.text; + NSArray *btnArr = @[self.oneTapBtn,self.tenTapBtn,self.hundredTapBtn]; + for (UIButton *btn in btnArr) { + btn.backgroundColor = [UIColor clearColor]; + [btn setTitleColor:[UIColor colorWithWhite:1 alpha:0.6] forState:UIControlStateNormal]; + } } - (void)textFieldDidEndEditing:(UITextField *)textField{ if(textField.text.length <= 1){ textField.text = @"1"; } self.chooseNum = textField.text; + NSArray *btnArr = @[self.oneTapBtn,self.tenTapBtn,self.hundredTapBtn]; + for (UIButton *btn in btnArr) { + btn.backgroundColor = [UIColor clearColor]; + [btn setTitleColor:[UIColor colorWithWhite:1 alpha:0.6] forState:UIControlStateNormal]; + } } - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { return [self validateNumber:string]; @@ -143,6 +153,7 @@ -(void)choosePurchaseNumAction:(UIButton *)sender{ self.chooseNum = sender.currentTitle; NSArray *btnArr = @[self.oneTapBtn,self.tenTapBtn,self.hundredTapBtn]; + self.textField.text = @""; for (UIButton *btn in btnArr) { if(btn == sender){ btn.backgroundColor = UIColorFromRGB(0x683FAD); diff --git a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBottomView.m b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBottomView.m index 92e946e0..ca2243f2 100644 --- a/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBottomView.m +++ b/YuMi/Modules/YMRoom/View/TreasureFairy/View/View/XPTreasureFairyBottomView.m @@ -112,6 +112,7 @@ -(void)chooseBuyNumAction:(UIButton *)sender{ UIButton *supBtn = (UIButton *)sender.superview; self.chooseNum = supBtn.currentTitle; + self.textField.text = @""; NSArray *btnArr = @[self.firstBg,self.tenthBg,self.hundredthBg]; for (UIButton *btn in btnArr) { if(btn == sender){ @@ -130,11 +131,25 @@ textField.text = @"1"; } self.chooseNum = textField.text; + NSArray *btnArr = @[self.firstBg,self.tenthBg,self.hundredthBg]; + for (UIButton *btn in btnArr) { + + btn.hidden = NO; + btn.superview.layer.borderWidth = 0; + + } } - (void)textFieldDidEndEditing:(UITextField *)textField{ if(textField.text.length <= 1){ textField.text = @"1"; } + NSArray *btnArr = @[self.firstBg,self.tenthBg,self.hundredthBg]; + for (UIButton *btn in btnArr) { + + btn.hidden = NO; + btn.superview.layer.borderWidth = 0; + + } self.chooseNum = textField.text; } - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {