问题
My program requires TXT/RTF editor functionality. I've only been able to find an old Apple example at Database Example: A Simple Text Editor. Unfortunately, its a Javascript program.
I've also seen a few text editor questions on stackoverflow. However, they seem to be mostly related to design and architecture.
My question is, are there any modern examples of an iOS/Objective C text editor from Apple to use as a starting point?
回答1:
Use UITextView for text editing. If you need rich text, you have to write something on your own - not currently available. Cocoanetics did start implementing rich text label at https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML and AFAIK he did want to create rich text editor too (at least I read this on Twitter).
来源:https://stackoverflow.com/questions/5351995/text-editor-example-for-iphone