自定义安全键盘git
代码GitHub地址:JYSafeKeyboardManagergithub
演示:web
安全键盘(原生+网页js+遮挡适配)安全
一、键盘遮挡输入框处理: //开启spa
[JYKeyBoardListener useJYKeyboardListener];
二、给某个输入框使用安全键盘:code
[JYSafeKeyboardManager useSafeKeyboard:self.pwdTextField type:SafeKeyboard_Type_Default];
[JYSafeKeyboardManager useSafeKeyboard:self.textView type:SafeKeyboard_Type_Number];
三、js端调用安全键盘blog
- (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]; }
四、设置各类键盘的颜色属性webview
[[JYSafeKeyboardConfigure defaultManager] setKeyboardBackgroundColor:[UIColor redColor]];
五、设置仓储值get
[JYSafeKeyboardConfigure defaultManager].storeValue = 5000.0;
六、是否使用InputAccessViewinput
[[JYSafeKeyboardConfigure defaultManager] setIsUsedInputAccessView:NO];