送背包礼物更新数量不对 自定义的数量送的还是一个
This commit is contained in:
@@ -92,13 +92,13 @@
|
||||
|
||||
- (void)sureButtonAction:(UIButton *)sender {
|
||||
NSString *countStr = [self.editTextFiled.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||
NSInteger count = [countStr integerValue];
|
||||
if (countStr.length == 0 || count == 0) {
|
||||
count = 1;
|
||||
if (countStr.integerValue == 0) {
|
||||
countStr = @"1";
|
||||
}
|
||||
[self.editTextFiled resignFirstResponder];
|
||||
self.editTextFiled.text = @"";
|
||||
self.countLabel.text = [NSString stringWithFormat:@"%ld", count];
|
||||
self.giftCountModel.giftNumber = countStr;
|
||||
self.countLabel.text = countStr;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
@@ -216,6 +216,7 @@
|
||||
- (void)xPGiftCountView:(XPGiftCountView *)view didClickItem:(XPGiftCountModel *)model {
|
||||
self.arrowButton.selected = NO;
|
||||
self.giftCountView.hidden= YES;
|
||||
self.giftCountModel = model;
|
||||
if (model.isCustomCount) {
|
||||
if (![[self.superview.superview subviews] containsObject:self.customCountView]) {
|
||||
[self.superview.superview addSubview:self.customCountView];
|
||||
@@ -227,8 +228,6 @@
|
||||
}
|
||||
self.customCountView.hidden = NO;
|
||||
[self.editTextFiled becomeFirstResponder];
|
||||
} else {
|
||||
self.giftCountModel = model;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,6 +240,7 @@
|
||||
}
|
||||
[self.editTextFiled resignFirstResponder];
|
||||
self.editTextFiled.text = @"";
|
||||
self.giftCountModel.giftNumber = textField.text;
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user