Lukas
Lukas

Reputation: 2535

i need to render text, but not in UIWebView

I've looked quite a lot but can't find a good text rendering solution. In my case uiwebview doesn't fullfil my needs. Also the text has to be with multiple fonts. I would like it to be like in iBooks, the text renders very fast(not like in the uiwebview) or maybe it's uiwebview, but then how do they do it to load that fast?

The text should also support text selection and other user interactions.

I'm open for suggestions, thanks in advance!

Upvotes: 2

Views: 321

Answers (4)

adamsiton
adamsiton

Reputation: 3672

Text selection and user interaction with CoreText is not so simple.

The best open source library that I know of that supports text selection is OmniGroup.

Look at their TextEditor example for something similar to what you requested.

Upvotes: 1

Damien Debin
Damien Debin

Reputation: 2822

You can have a look at NSAttributedString-Additions-for-HTML, it creates NSAttributedString from HTML, and at TTTAttributedLabel (or OHAttributedLabel), a drop-in replacement for UILabel that supports NSAttributedStrings.

Upvotes: 1

Pierre Espenan
Pierre Espenan

Reputation: 4066

You should have a look at the Core Text framework. It can be a bit complicated to use just for some lines of text, but it may be what you are looking for.

Here is the Apple official documentation :
Core Text Framework Apple official documentation

And here is a good link for beginners :
Befriending Core Text

Upvotes: 1

Matthew Gillingham
Matthew Gillingham

Reputation: 3429

It sounds like you should look at Core Text. It is framework intended specifically for text rendering.

Upvotes: 1

Related Questions