Skip to content

UITextInputMode

UITextInputMode 在系统 UIKit 中用于描述当前键盘输入模式(例如输入法语言)。在插件运行时它还暴露了一组与文本选择/标记相关的字段(可能用于内部实现或统一接口映射)。

属性类型说明
primaryLanguagestring | null只读。主要语言标识(例如 "en-US")。
markedTextRangeUITextRange | null只读。标记文本范围。
selectedTextRangeUITextRange | null当前选中文本范围(可读写)。
markedTextStyleNSDictionary | null标记文本样式。
beginningOfDocumentUITextPosition | null只读。文档起点。
endOfDocumentUITextPosition | null只读。文档终点。
startUITextPosition | null只读。范围起点。
endUITextPosition | null只读。范围终点。
textstring | null只读。文本内容(若运行时提供)。
rect{ x: number, y: number, width: number, height: number }只读。相关区域。
tokenizerid只读。分词器对象。
textInputViewUIView | null只读。输入视图。
writingDirectionnumber只读。书写方向。
selectionAffinitynumber选择亲和方向。
emptyboolean只读。是否为空。
isVerticalboolean只读。是否垂直布局。
containsStartboolean只读。是否包含起点。
containsEndboolean只读。是否包含终点。
alternativeInterpretationsNSArray只读。备选解释列表。
inputDelegateid输入代理对象。
方法参数返回值说明
currentInputMode()UITextInputMode | null返回当前输入模式。
activeInputModes()NSArray返回活跃输入模式列表。
头文件 API 清单

正在加载…

协议:,来源: