使用核心文本是否有UITextView
和UITextField
的开源重新实现?
Apple的SimpleTextInput有SimpleCoreTextView
和EditableCoreTextView
个类,明确说明:
File: SimpleCoreTextView.m
Abstract:
A view that draws text, reasons about layout, and manages a selection over its text range.
IMPORTANT: Its use of CoreText is naive and inefficient, it deals only with
left-to-right text layout, and it is by no means a good template for any text
editor. It is a toy implementation included only to illustrate how to bind
the system keyboard to some pre-existing text editor.
换句话说,它没有处理,例如阿拉伯语,效率低下。
根据Core Text和UITextInput
协议系列,我们有什么替代方案可以完全实现可编辑的文本字段或文本视图?