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 {