适用于 iPhone 的简单文本编辑器
有没有适用于 iPhone 的简单文本编辑器,具有粗体、斜体和更改颜色和字体等功能?我想将此功能添加到我的 iPhone 应用程序中。
任何帮助将非常感激。
Is there any simple text editor available for iphone having features like BOLD, ITALIC and changing colors and fonts? I want to add this functionality to my iphone app.
Any help will be really appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你必须通过Quartz2d来开发它。换句话说,你可以通过处理UIView的CGContext。请参阅 Quartz2d 编程指南。例如,您可以通过提供粗体字体
You have to develop it through Quartz2d.In otherwords ,you can through handling CGContext of UIView. see the Quartz2d programming guide.for example you can give bold font through
文本编辑器专业版似乎具有这些功能。不过相当昂贵: http://itunes.apple.com /dk/app/text-editor-pro/id316815447?mt=8
Text Editor Pro seems to have those features. Pretty expensive though: http://itunes.apple.com/dk/app/text-editor-pro/id316815447?mt=8
Oliver Drobnik(又名 Cocoanetics)正在开发 iOS 的富文本编辑器。
不幸的是,它不会是免费的。然而,他在这里发布了相当大的代码块,作为他的富编辑器的基础: https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML
它采用 HTML 并将其转换为核心文本。那里有很多艰苦的工作。
它本身并不是一个丰富的编辑器,但正如我所说,它是一个丰富的编辑器的基础。如果你不想在奥利弗完成后付钱给他,你可以用它来写你自己的。您可以在这里查看 Oliver 一直在做什么: http:// /www.cocoanetics.com/2011/01/rich-text-editing-on-ios/
Oliver Drobnik (aka Cocoanetics) is working on a rich text editor for iOS.
It won't be free, unfortunately. However, he has released a sizeable chunk of code that serves as the foundation of his rich editor here: https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML
It takes HTML and turns it into core text. A lot of hard work right there.
That, on its own, is not a rich editor, but like I said, it serves as the foundation of one. You could use it to write your own, if you don't want to pay up for Oliver's when he's finished. You can see what Oliver has been working on here: http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/