TestsTested | โ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | โ |
Maintained by CNKCQ.
A custom digital keyboard for idcard
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)
}
}
###