iphone应用程序,如文字处理器格式文本 [英] iphone app that formats texts like a word processor

查看:104
本文介绍了iphone应用程序,如文字处理器格式文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于这样的一般问题,对不起,但我想知道是否(以及如何)是可能写一个格式化txt文件在不同的网页上的iPhone应用程序 - 就像Microsoft Word将在布局模式下,如果你打开一个新文档并粘贴txt文件。

Sorry for such a general questions, but I'm wondering if (and how) it is possible to write an iPhone App which formats a txt file on different pages - just like Microsoft Word would do in layout mode if you open a new document and paste a txt file.

换句话说,我不想使用无尽的UITextView。我需要的是一个编辑器,可以在不同的页面上格式化文本。

In other words, I don't want to use an UITextView which is endless. All I need is an editor which formats text on different pages.

有一个简单的方法或者我需要自己编程的一切吗?也就是说剪切txt文件,并且相应地处理用户输入(例如,如果他粘贴某事,如果他删除某事,如果他到达页面的结尾等)。

Is there an easy way or would I need to program everything by myself? I.e. cut txt files in different pieces and handle the user input accordingly (e.g. if he pastes something, if he deletes something, if he reaches the end of the page, etc. etc.).

我想这在Mac OS X上是相当琐碎的(我只是看看他们的文档如何创建一个简单的文本编辑器),但我得到的感觉,这是几乎不可能的iPhone上。

I guess this would be quite trivial on Mac OS X (I just had a look at their docs of how to create a simple text editor) but I get the feeling that this is nearly impossible on the iPhone.

任何想法都不胜感激。

推荐答案

大文本转换为在Ms Word中看起来像布局视图的东西。当您考虑编辑文本时,会出现此问题。一种可以解决的方法是始终将完整的tekst保存在一个占位符中,并允许用户编辑该占位符,而不是特定的页面。然后编辑完成后,将文本拆分为适当的页面。如果你想单独编辑每个页面,你必须处理页面的调整,这是一个痛苦,但可能。

It's not a problem to split one large text into something that looks like a layout view in Ms Word. The problem appears when you consider editing the text. One way you can go about it is to always keep full tekst in one placeholder and allow user to edit that placeholder instead of particular "pages". Then after the edit is finished you split the text into appropriate pages. If you would want to edit each page separately you would have to handle adjustment of pages yourself which is a pain, but possible.

这篇关于iphone应用程序,如文字处理器格式文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆