cranimation / crboxinputview Goto Github PK
View Code? Open in Web Editor NEWVerify code input view. Support security type for password.短信验证码输入框,支持密文模式
License: MIT License
Verify code input view. Support security type for password.短信验证码输入框,支持密文模式
License: MIT License
如题
line的格式有些地方说明不全,建议说下customCellProperty,建议加一下自带的几种格式,不然实现一个line,还需要用户自定义继承,有点麻烦
老哥你这个必须得修改.m才能实现特定样式吗,内部集成几个常用样式好吗?改源码感觉很尴尬啊
我在 setBoxInputModel 方法里设置了一下,运行崩溃了
设置inputType为CRInputType_Normal输入英文字母,在输入到第二英文时,左上角会出现一个浅蓝色的view
就是输入完成之后 双击第一个框 当框中有选中的阴影背景后 再点击删除会有问题
下划线风格时,希望也添加一个下划线的 选中和未选中 状态
可以像UITextfield那样设置inputview
lazy var boxView : CRBoxInputView = { let view = CRBoxInputView.init(codeLength: 6) // let cellProperty = CRBoxInputCellProperty() // cellProperty.cellBorderColorNormal = .clear // cellProperty.cellBorderColorSelected = .colorWithHexString(ThemeMainColor) // cellProperty.cellBorderColorFilled = .clear // cellProperty.cellBgColorNormal = .colorWithHexString(ThemeBlockColor) // cellProperty.cellBgColorSelected = .colorWithHexString(ThemeBlockColor) // cellProperty.cellBgColorFilled = .colorWithHexString(ThemeMainColor) // cellProperty.cellCursorColor = .colorWithHexString(ThemeMainColor) // cellProperty.borderWidth = 1 // cellProperty.cornerRadius = 20 // cellProperty.configCellShadowBlock = { [weak self] (layer: CALayer) in // layer.shadowColor = UIColor.colorWithHexString(ThemeBlockColor, alpha: 0.2).cgColor // layer.shadowOpacity = 1 // layer.shadowOffset = CGSize(width: 0, height: 2) // layer.shadowRadius = 10 // } // ^[A-Za-z0-9]+$ view!.keyBoardType = .asciiCapable view!.inputType = .regex view!.customInputRegex = "[^A-Za-z0-9]" view!.boxFlowLayout?.itemSize = CGSize(width: 44, height: 50) view!.loadAndPrepare(withBeginEdit:false) // view!.customCellProperty = cellProperty return view! }()
按照以上设置, CRBoxInputCellProperty 完全不起作用, 只能修改库中的源代码, 但是每次更新pod 库后都需要重新进行设置, 是否可以进行优化?
执行pod search CRBoxInputView
报错
[!] Unable to find a pod with name, author, summary, or description matching
CRBoxInputView
textDidChangeblock; 这个回调会执行两次
swift编写
就是输入到第N个时 发现输出时,无法编辑前面输入的
没有看到下划线阴影的熟悉
在10.0版本上边框都没有了
Duplicate interface definition for class 'CRBoxInputCellProperty'
用pod导入就出现这个bug,在
@interface CRBoxInputCellProperty : NSObject 报错
pod 安装失败, [!] Unable to find a specification for CRBoxInputView
建议在CRBoxInputView.m里添加如下方法,用于初始化xib/storyboard上的视图:
- (instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
if (self) {
[self initDefaultValue];
[self addNotificationObserver];
}
return self;
}
问题描述
收到短信验证码之后点击填充,只会将验证码最后一位填充进输入框
CRBoxInputView.m
我扫尾调整了下 能适应项目
for (int i = (int)self->_oldLength; i < verStr.length; i ++) {
NSString *subStr = [verStr substringWithRange:NSMakeRange(i, 1)];
if ([self->_valueArr count] < _codeLength) {
[self->_valueArr addObject:subStr];
}
}
上线前测试设备没有装卡验证自动填充... 后边用户提到的问题
不过控件是真的很好用 谢谢作者
修改密码需要实现:
1、默认显示已存在的密码。
2、当开始编辑时,自动清空掉旧密码
如题,由于最近cocoapods更新了重要的功能版本,但是发现此工具导入的masroy没有引用为#import <xxxxxx/xxxxxx.h>的格式而是#import "xxxxxx.h"的格式,导致须要更改pod文件,望开发者有一个良好的开发习惯.
哪个大佬有swift使用的demo啊
初学者只会swift 跪求
现在背景色分为cellBgColorNormal和 cellBgColorSelected,可不可以根据已有数字和没有数字来设置背景色?
有个需求是: 验证码输入后,判断验证码如果输入不正确, 边框颜色和输入文字颜色同时变红色. 重新输入又恢复默认颜色.
如题
当前只能从customLineViewBlock定义Line,没法做到动态的调整Line的高度。
比如,密码位数为4-8位,我设置的codelength为最大值8,但是会出现当使用ifClearAllInBeginEditing和reloadInputString时,如果密码为6位,当我开始编辑的时候,并未自动clearall。textFieldDidBeginEditing中是否可以不依赖于codelength去做cleaerAll的动作。
请问你这个密码框,支持收到验证码自动填充吗?
CRBoxInputCellProperty类里面 用#import "CRLineView.h" 替换#import <CRBoxInputView/CRLineView.h>导入就不报错了,麻烦看下
self.edgesForExtendedLayout = UIRectEdgeNone;
当输入完验证码后,页面会上移
主要代码:
self.edgesForExtendedLayout = UIRectEdgeNone;
...
[_boxInputView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(120);
make.right.mas_equalTo(-20);
make.left.mas_equalTo(20);
make.height.mas_equalTo(50);
}];
wuzhiweideMBP:~ wuzhiwei$ rm /Library/Caches/CocoaPods/search_index.json wuzhiwei$ pod search CRBoxInputView
wuzhiweideMBP:
Creating search index for spec repo 'artsy'.. Done!
Creating search index for spec repo 'master'.. Done!
[!] Unable to find a pod with name, author, summary, or description matching CRBoxInputView
[!] Skipping MiniPlengi
because the podspec contains errors.
[!] Skipping OCast
because the podspec contains errors.
[!] Skipping OCastReferenceDriver
because the podspec contains errors.
如果最后两位输入的快,倒数第二位不会加密
遇到这个问题,帮忙看下,谢谢!
If I already inserted some text but update ifNeedSecurity, can I refresh the existing texts.
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.