Reputation: 105
Im using CoreText to display some text, creating framesetter, frames and so, and everything is fine. I can even format the text, but this all is done before I draw. Now the question that is driving me crazy:
CoreText is just to render text? I cannot get any reference to CTRuns or Glyphs to highlight them?
Another sub big question, the Pages App dont use CoreText, anyone knows? In Pages, you can select any already drawn styled text!
All I want is to draw the text and be able to let the user tap to select any text or doubleTap to select the paragraph.
Please, anyone, any light?
Thanks in advance.
Upvotes: 2
Views: 1211
Reputation: 110
you can get image bounds of CTLines and CRRuns via core text here is little example i made for my app it's not perfect yet but you can get a little idea of how it works.
Upvotes: 0
Reputation: 34185
CoreText is just to render text. Implementing user interaction is quite another matter. You need to implement UITextInput
protocol, see here. It's a big job.
If you just want to input text and don't have a need for advanced typography, just use UITextView
or UIWebView.
Upvotes: 1