/KRKeyboard

A multi-function keyboard.

Primary LanguageObjective-CMIT LicenseMIT

KRKeyboard

KRKeyboard: A multi-function keyboard.

Support type:

  • numeric
  • alphabetic
  • symbol
  • password

Effects

效果 效果

Use

  1. Drag KRKeyboard folder into your project.
  2. Import KRKeyboard.h
  3. init KRKeyboard
  4. implementation protocol
  5. 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