Coder Social home page Coder Social logo

cranimation / crboxinputview Goto Github PK

View Code? Open in Web Editor NEW
974.0 12.0 125.0 3.8 MB

Verify code input view. Support security type for password.短信验证码输入框,支持密文模式

License: MIT License

Ruby 32.80% Objective-C 67.20%
verifycode password uitextview uitextfield verifycodeview placeholder mobile phone phone-number

crboxinputview's People

Contributors

bearran avatar bearxr avatar wtuyp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crboxinputview's Issues

pod search 还是报错

wuzhiweideMBP:~ wuzhiwei$ rm /Library/Caches/CocoaPods/search_index.json
wuzhiweideMBP:
wuzhiwei$ pod search CRBoxInputView
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.

在Swift中使用时, 初始化 CRBoxInputCellProperty 无作用

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 库后都需要重新进行设置, 是否可以进行优化?

系统中文键盘输入异常

WX20190719-144454
你好,使用系统的中文键盘输入时会出现输入异常,这个要怎么处理呢。目前键盘类型设置为email

pod导入就出错啦

Duplicate interface definition for class 'CRBoxInputCellProperty'
用pod导入就出现这个bug,在
@interface CRBoxInputCellProperty : NSObject 报错

佬板敢不敢支持pod 1.7.0+

如题,由于最近cocoapods更新了重要的功能版本,但是发现此工具导入的masroy没有引用为#import <xxxxxx/xxxxxx.h>的格式而是#import "xxxxxx.h"的格式,导致须要更改pod文件,望开发者有一个良好的开发习惯.

页面上移

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);
}];

自动填充只添加了最后一位

问题描述
收到短信验证码之后点击填充,只会将验证码最后一位填充进输入框

CRBoxInputView.m

  • (void)textDidChange:(UITextField *)textField
    NSString *subStr = [verStr substringWithRange:NSMakeRange(verStr.length - 1, 1)];
    [self->_valueArr addObject:subStr];
    [self delaySecurityProcess];
    自动填充的字符串是一长串。所以我看这里的逻辑应该只是一个一个写的

我扫尾调整了下 能适应项目
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];
}
}
上线前测试设备没有装卡验证自动填充... 后边用户提到的问题

不过控件是真的很好用 谢谢作者

customCellProperty

line的格式有些地方说明不全,建议说下customCellProperty,建议加一下自带的几种格式,不然实现一个line,还需要用户自定义继承,有点麻烦

可否支持可变位数的密码

比如,密码位数为4-8位,我设置的codelength为最大值8,但是会出现当使用ifClearAllInBeginEditing和reloadInputString时,如果密码为6位,当我开始编辑的时候,并未自动clearall。textFieldDidBeginEditing中是否可以不依赖于codelength去做cleaerAll的动作。

pod 安装失败,

pod 安装失败, [!] Unable to find a specification for CRBoxInputView

建议增加xib/storyboard支持

建议在CRBoxInputView.m里添加如下方法,用于初始化xib/storyboard上的视图:

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super initWithCoder:coder];
    if (self) {
        [self initDefaultValue];
        [self addNotificationObserver];
    }
    
    return self;
}

无法回退

就是输入到第N个时 发现输出时,无法编辑前面输入的

pod search 搜索不到库

执行pod search CRBoxInputView报错
[!] Unable to find a pod with name, author, summary, or description matching CRBoxInputView

Cell背景色问题

现在背景色分为cellBgColorNormal和 cellBgColorSelected,可不可以根据已有数字和没有数字来设置背景色?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.