gpt4 book ai didi

ios - 使用 Core Text 重新实现 UITextView 和 UITextField

转载 作者:行者123 更新时间:2023-11-29 13:28:25 24 4
gpt4 key购买 nike

是否有使用 Core Text 的 UITextViewUITextField 的开源重新实现?

有 Apple 的 SimpleTextInput使用 SimpleCoreTextViewEditableCoreTextView 类,其中明确表示:

     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 协议(protocol)族,我们有哪些替代方案可以完整实现可编辑文本字段或 TextView ?

最佳答案

您可以使用或引用OmniGroup's TextEditor用于基于 Core Text 和 UITextInput

实现可编辑的文本字段或 TextView

关于ios - 使用 Core Text 重新实现 UITextView 和 UITextField,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12479683/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com