项目介绍:
github: https://github.com/DengKaiRong/KRKeyboard
KRKeyboard
KRKeyboard: A multi-function keyboard.
Support type:
-
numeric
-
alphabetic
-
symbol
-
password
Effects
Use
Drag
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 40
Setting:
[zxKB setClickSoundEnable:NO]; // 是否开启键盘声音
any else. see demo.
Other
any issue. Please contact me.
Q Q: 448150220
Wechat: dengsir058
E-mail: dengsir@goldenbeetech.com
github: https://github.com/DengKaiRong/KRKeyboard
If you like it, star it! 🙂
KRKeyboardProj.zip
(430.99 KB, 下载次数: 180)
2017-7-4 20:49 上传
点击文件名下载附件
KRkeyboard