Skip to content

UITextRange

UITextRange 表示一段文本范围。插件运行时中它通常作为 UITextInputMode/UITextPosition 暴露字段的类型出现,用于描述选区或标记文本范围。

属性类型说明
primaryLanguagestring | null只读。主要语言。
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只读。输入视图。
emptyboolean只读。是否为空。
isVerticalboolean只读。是否垂直布局。
containsStartboolean只读。是否包含起点。
containsEndboolean只读。是否包含终点。
alternativeInterpretationsNSArray只读。备选解释列表。
inputDelegateid输入代理对象。

当前运行时未额外暴露 UITextRange 的类成员。

头文件 API 清单

正在加载…

协议:,来源: