ios - 使用 UIInputViewController 检测硬件键盘事件
问题描述
UITextInputDelegate
我需要一种方法来处理在运行 App 键盘扩展时发生的事件和修改文本。
目前我可以处理键盘箭头,因为它们会改变光标位置,但显然按下的键不会改变任何东西。
可能没有设计,但我想知道,我试过了
@protocol UITextInputDelegate <NSObject>
- (void)selectionWillChange:(nullable id <UITextInput>)textInput;
- (void)selectionDidChange:(nullable id <UITextInput>)textInput;
- (void)textWillChange:(nullable id <UITextInput>)textInput;
- (void)textDidChange:(nullable id <UITextInput>)textInput;
解决方案
推荐阅读
- java - TextToSpeech SynthesizeToFile android 函数 java
- python - TypeError: generator() 正好接受 2 个参数(1 个给定)
- php - 在 WordPress 博客中为页面帖子分页
- spring - 当您可以使用 Spring Cloud Task 时,为什么要使用 Spring Cloud Stream 与 kafka/rabbitmq 绑定?
- cuda - 当 N > 32 时内核不执行
- regex - 正则表达式匹配 Centos 提示
- com - ASP 支持表单错误:服务器对象错误“ASP 0177:800401f3”Server.CreateObject 失败
- python - 这个python代码行中的三个点是什么意思?
- swift - 快速将网络管理器转换为通用类型
- flutter - “NoSuchMethodError: The getter 'length' was called on null” 当代码中没有“length”字样时出现消息?