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

addBadge(number:xxx)命名建议 #45

Open
KevinKingCN opened this issue Apr 13, 2020 · 0 comments
Open

addBadge(number:xxx)命名建议 #45

KevinKingCN opened this issue Apr 13, 2020 · 0 comments

Comments

@KevinKingCN
Copy link

addBadge第一反应就是添加了一个View,所以当我的数字要改变时再次使用addBadge(number:)时就觉得是不是要先把原来的哪个badge先remove掉。层层点进去看才知道,在badge的get方法里有个防止重复创建的判断,这才放心。
所以本着避免歧义,对初使者更容易接受的出发点,建议后续更新考虑使用setBadge(number:)这种命名。

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

1 participant