Tips on implementing a custom UITextView interface on the iPhone?
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-03-23T11:57:59Z
Indexed on
2010/04/07
20:03 UTC
Read the original article
Hit count: 662
I am trying to implement a control to edit text that will display the text in multiple colors. None of the solutions I have attempted yet have been good enough.
- UITextView cannot accomplish this. All of the text must be the same color.
- Using CoreGraphics to draw the text does not allow the text to be selected.
- Using a UIWebView, DIV and PRE tags cannot be set to contentEditable on Mobile Safari.
- Currently playing with using an off-screen TEXTAREA and an on-screen DIV to show the rendered text. This works pretty well, except supporting all of these at the same time seems impossible: click-to-type, click-to-move-cursor, click-and-hold-select/copy/paste.
Anyone have any tips on this predicament?
I've been trying to find any preexisting library out there that will accomplish this in a good way, to no luck. I'm open to any ideas!
© Stack Overflow or respective owner