自定义安全键盘

 

代码GitHub地址:JYSafeKeyboardManager

演示:

 安全键盘

安全键盘(原生+网页js+遮挡适配)

1、键盘遮挡输入框处理: //开启

[JYKeyBoardListener useJYKeyboardListener];

 


2、给某个输入框使用安全键盘:

[JYSafeKeyboardManager useSafeKeyboard:self.pwdTextField type:SafeKeyboard_Type_Default];

[JYSafeKeyboardManager useSafeKeyboard:self.textView type:SafeKeyboard_Type_Number];

 

3、js端调用安全键盘

- (void)showKeyBoard:(NSString*)param{
  NSDictionary *dic = [self parseDictWithJsonString:param];
  NSDictionary *frameDic = dic[@"frame"];
  NSLog(@"%@",dic);
  [JYSafeKeyboardManager useWebViewSafeKeyboardWithType:[dic[@"type"] integerValue] inputId:dic[@"inputid"] webView:self.webview frameDic:frameDic];
}

 

4、设置各种键盘的颜色属性

[[JYSafeKeyboardConfigure defaultManager] setKeyboardBackgroundColor:[UIColor redColor]];

 

5、设置仓储值

[JYSafeKeyboardConfigure defaultManager].storeValue = 5000.0;

 

 

6、是否使用InputAccessView

[[JYSafeKeyboardConfigure defaultManager] setIsUsedInputAccessView:NO];

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-19
  • 2021-10-22
  • 2022-12-23
  • 2021-08-19
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案