使用uitextview作为文本编辑器进行ios编程
我正在为 ipad 开发一个应用程序,它的工作方式类似于文本编辑器,您可以在 uitextview 中不受任何限制地输入文本。然而,我遇到的问题是,一段时间后,当文本变得非常大(大约 20 页)时,输入新字符时会出现很大的滞后。这是与无法处理大文本的 uitextview 有关的问题还是这只是基于 ipad 硬件的限制。我应该使用其他东西而不是 uitextview 来输入文本吗?谢谢。
I'm developing an application for ipad that works like a text editor where you can input text without any limitations into a uitextview. However the problem I have is that after a while when the text gets quiet large (about 20 pages) there is big lag when entering new characters. Is this a problem related to uitextview that can't handle large texts or is this just a limitation based on ipad hardware. Should I be using something else instead of an uitextview to input text? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以尝试自己缓存进出UITextView,那么它肯定会变得更快。我不知道还有其他更合适的对象,因为所有编辑方法都已经存在。
you may try to cache in and out the UITextView yourself, then it will certainly become faster. I do not know any other object that is more suitable, since all the editing methods are already there.
如果文本太长,可能会将内容拆分为多个 UITextView?
Maybe split things up into multiple UITextViews if the text gets too long?