Prerna chavan
Prerna chavan

Reputation: 3249

Change font of selected text in UITextView

Can anybody suggest me how to change the font of the selected text in UITextView.I cannot use UIWebView since i have to edit the text. I have seen the Pages app.How it is possible in that app.

Upvotes: 0

Views: 823

Answers (2)

Simon Lee
Simon Lee

Reputation: 22334

My article on rich text UILabels may help... details and code can be found here!

We're also about to finish a follow-up article which is basically an HTML text renderer with styles, bullets etc, this can render to a context so can render to a UIView or a PDF context for example. If you're not particularly in a hurry I can drop you a line when it is complete....

Upvotes: 1

Rob Napier
Rob Napier

Reputation: 299355

See Formatting text within UILabel differently.

Since you need editing, you should also look at JavaScript-based editors such as CKEditor or TinyMCE. I also highly recommend the WWDC 2011 video for Session 511: "Rich Text Editing in Safari on iOS."

Upvotes: 1

Related Questions