Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use multiple font style in UITextView?

I have a requirement to use multiple font style in UITextView. Like Bold, Italic and Underline text in single Textview. Like:

One word is Bold second may be italic third Underline as per user selection.

I don't think this is allowed to do but still if any one have achieved and want to share. I need this all while enter text and same while displaying.

Thanks

like image 944
Kapil Choubisa Avatar asked Nov 15 '22 00:11

Kapil Choubisa


1 Answers

You're right that the standard UITextView does not support rich editing. At the moment there are a few solutions to the problem.

The Omni Group has released their iOS and Mac frameworks under an open source license. These include a very powerful rich text editor (see: OUIEditorFrame.m). These are very powerful but also extremely complex. Their sample iPad app includes the rich text editor example. Further discussion can be found here

Secondly, this guy has been working on a custom rich text editing control and is offering it under a negotiable licensing agreement.

Finally, you can do it all yourself and create an editor control that implements the UITextInput protocol. Aside from the Apple documentation, there are some tips on doing this here.

like image 51
simeon Avatar answered Mar 06 '23 17:03

simeon