Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当我需要定制如图这样的动画,给按钮加border的时候,bug就出来了. #6

Open
YanCeyMichael opened this issue Mar 31, 2017 · 1 comment

Comments

@YanCeyMichael
Copy link

YanCeyMichael commented Mar 31, 2017

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

2

所以我做了微调:
把你的源代码:

  • (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.

1gif

@YanCeyMichael YanCeyMichael changed the title 当我需要定制如图这样的动画,给独自按钮加border的时候,如图的bug就出来了. 当我需要定制如图这样的动画,给按钮加border的时候,bug就出来了. Mar 31, 2017
@jkpang
Copy link
Owner

jkpang commented Jul 6, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants