PPNumberButton
PPNumberButton copied to clipboard
当我需要定制如图这样的动画,给按钮加border的时候,bug就出来了.
当我需要定制如图这样的动画,给按钮加border的时候,bug就出来了 特别是当ppnumberButton.minValue <= 默认值 1 的时候, decreaseHide = YES的时候. 加号增加方法里的 逻辑上有漏洞.

所以我做了微调: 把你的源代码:
- (void)setMinValue:(NSInteger)minValue { _minValue = minValue; _textField.text = [NSString stringWithFormat:@"%ld",minValue]; }
改成了
- (void)setMinValue:(NSInteger)minValue { _minValue = minValue; if (_decreaseHide) { _textField.text = [NSString stringWithFormat:@"%ld",minValue - 1]; }else { _textField.text = [NSString stringWithFormat:@"%ld",minValue]; } }
然后运行结果达到了我满意的状态,解决了+方法里的动画不执行的bug.

非常感谢你发现的这个问题! 你可以先fork我最新的代码, 修改代码后提一个 pull request, 这样你也成为了这个项目的维护者之一 @YanCeyMichael