github: https://github.com/DengKaiRong/KRKeyboard
KRKeyboardKRKeyboard: A multi-function keyboard.
Support type:numeric
alphabetic
symbol
password
EffectsDrag KRKeyboard folder into your project.
Import KRKeyboard.h
init KRKeyboard
implementation protocol
run project :)
numeric keyboard:// 数字键盘 KRKeyboard * zxKB = [KRKeyboard creatWithKeyboardType:NumberKeyboard delegateTarget:self]; // 设置为输入键盘, tf 是 UITextField 对象 tf.inputView = zxKB;alphabetic keyboard:// 数字键盘 KRKeyboard * zxKB = [KRKeyboard creatWithKeyboardType:LetterKeyboard delegateTarget:self]; // 设置为输入键盘, tf 是 UITextField 对象 tf.inputView = zxKB;symbol keyboard:// 数字键盘 KRKeyboard * zxKB = [KRKeyboard creatWithKeyboardType:SymbolKeyboard delegateTarget:self]; // 设置为输入键盘, tf 是 UITextField 对象 tf.inputView = zxKB;password keyboard:// 数字键盘 KRKeyboard * zxKB = [KRKeyboard creatWithKeyboardType:PassWordKeyboard delegateTarget:self]; // 设置为输入键盘, tf 是 UITextField 对象 tf.inputView = zxKB;Delegate、Config、Setting:KRKeyboardDelegate:/** 按键回调 @param key 单击的文本 @param keyType 单击的文本类型 @param keyboardType 键盘类型 @param content 已输入的内容 */ - (void)pressKey:(NSString *)key keyType:(KRKeyType)keyType keyboardType:(KRKeyboardType)keyboardType content:(NSString *)content;Config:on Define.h file
//------ 键盘配置 ------// // 字体及大小 #define KRFONTNAME @'Helvetica-light' // 键盘高度 #define KRKEYBOARDHEIGHT KSCREEN_HEIGHT * 0.4 // 键盘顶部logo视图的高度 #define KRLOGOVIEW_HEIGHT 40Setting:[zxKB setClickSoundEnable:NO]; // 是否开启键盘声音any else. see demo.Otherany issue. Please contact me. Q Q: 448150220 Wechat: dengsir058 E-mail: dengsir@goldenbeetech.comgithub: https://github.com/DengKaiRong/KRKeyboard
If you like it, star it! :)