IDCardKeyboard 1.1.1

IDCardKeyboard 1.1.1

测试已测试
语言 SwiftSwift
许可证 MIT
发布上次发布2016 年 8 月
SPM支持 SPM

CNKCQ 维护。




  • KingCQ

IDCardKeyboard

IDCardKeyboard

用于身份证的自定义数字键盘

👀另请参阅

📖用法

  class ViewController: UIViewController {
    let textField: UITextField = UITextField()
    let fieldNext: UITextField = UITextField()

    override func viewDidLoad() {
        super.viewDidLoad()


        view.backgroundColor = .blueColor()
        textField.frame = CGRectMake(80, 400, 160, 30)
        textField.borderStyle = .RoundedRect
        textField.clearButtonMode = .WhileEditing
        textField.becomeFirstResponder()
        view.addSubview(textField)

        fieldNext.frame = CGRectMake(80, 500, 160, 30)
        fieldNext.borderStyle = .RoundedRect
        fieldNext.placeholder = "nextField"
        view .addSubview(fieldNext)

        textField.idcardKeyboard(view)//一句代码搞定数字键盘


    }


    override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
            UIApplication.sharedApplication().keyWindow?.endEditing(true)
    }

}

### 🔑Swift 2.2 基础知识