jkpang / ppnumberbutton Goto Github PK
View Code? Open in Web Editor NEWiOS中一款高度可定制性商品计数按钮(京东/淘宝/饿了么/美团外卖/百度外卖样式)
License: MIT License
iOS中一款高度可定制性商品计数按钮(京东/淘宝/饿了么/美团外卖/百度外卖样式)
License: MIT License
点击一下加或减按钮后数字会一直增加或减小,再次点击相反的按钮,两个定时器就会相互作用,数字在左右跳动
非0和非负数的情况下。能做成小数点的加减吗?
不支持自定义布局吗?
如果不想费事解决 github搜索HWWeakTimer 把NSTimer替换为HWWeakTimer 就可以解决
可不可以添加输入框文本数字颜色的属性支持,谢谢
老问题依旧在,加减同时按住后,松开手,数字自己在动
将加减的默认数值设置成自定义,这样加减一次就不是每次都是加减1了
当我需要定制如图这样的动画,给按钮加border的时候,bug就出来了
特别是当ppnumberButton.minValue <= 默认值 1 的时候, decreaseHide = YES的时候.
加号增加方法里的 逻辑上有漏洞.
所以我做了微调:
把你的源代码:
改成了
然后运行结果达到了我满意的状态,解决了+方法里的动画不执行的bug.
我设置的minValue = 1, currentNumber = 1,但是在iOS11数字是0,而且点击加减号无反应,因新版xocde不好用,所以xocde的目前无法调试iOS11,烦请作者帮忙看下
我是改变数量就会调用网络请求, 长按的话, 一直频繁请求接口会导致崩溃.
您好,我使用的是xcode7版本,并未升级xcode8,有什么办法在不升级xcode8的情况下成功运行您的工程呢?静待回复
在原代码创建这两个button的时候加了如下两行代码,bug可解决
[_increaseBtn setExclusiveTouch:YES];
[_decreaseBtn setExclusiveTouch:YES];
您好,输入的文字没有进行合法性校验,可否加上?目前可以输入多个小数点、字符串、中文等等都可以输入
RT
如果数量为整数以1为单位加减,如果数量有小数以0.1为单位加减
建议换成NSDecimalNumber做数值加减,minValue 、maxValue、step使用String做接收。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.