SwiftyCodeView完全可定制的验证码输入框(支持RxSwift)

完全可定制的验证码输入框,SwiftyCodeView是你在 Swift 项目里验证码输入的好帮手。界面优雅,集成简单,还带上了 RxSwift 的加持,响应也快,交互体验不错。

拖个 UIView 到 storyboard 上,类名改成 SwiftyCodeView,实现下 SwiftyCodeViewDelegate 就能跑起来,真的就这么轻松。要输入完成的回调?一句 didFinishInput 就搞定:

extension ViewController: SwiftyCodeViewDelegate {
  func codeView(sender: SwiftyCodeView, didFinishInput code: String) -> Bool {
    print("Entered code: \(code)")
    return true
  }
}

自定义的自由度也挺高,位数、样式、间距这些都能调。配合 RxSwift 的响应式链路,在输入监听这块丝滑,没什么阻力。

验证码场景下最怕的是什么?就是输入框卡、焦点跳转乱。而 SwiftyCodeView 这块做得比较稳,适合那种“输完自动校验”的场景,比如登录、注册或者转账验证都挺合适。

如果你在做 Swift 项目,刚好又用上 RxSwift,这套组件可以直接拉进来用,节省不少功夫。喜欢折腾样式的朋友也能改得比较开心。

folder
SwiftyCodeView:完全可定制的UI组件,用于使用RxSwift支持以swift编写的验证代码! 预估大小:387个文件
file
Contents.json 2KB
file
Pods-SwiftyCodeViewDemo-umbrella.h 338B
file
SwiftyCodeView-umbrella.h 320B
file
SwiftyCodeView.podspec.json 1KB
file
RxCocoa.h 462B
file
_RXDelegateProxy.h 741B
file
_RXObjCRuntime.h 4KB
file
_RXKVOObserver.h 801B
file
RxCocoaRuntime.h 470B
file
_RX.h 4KB
file
RxCocoa-umbrella.h 452B
file
SwiftyCodeView-umbrella.h 320B
file
Pods-SwiftyCodeViewDemoRX-umbrella.h 342B
file
RxRelay-umbrella.h 306B
file
RxSwift-umbrella.h 306B
file
Contents.json 2KB
folder
.gitkeep 文件夹
folder
.gitkeep 文件夹
file
.gitignore 729B
file
demo.gif 565KB
zip 文件大小:1.02MB