How can i find attribute of the text (it's NSAttributedString where each sentence have it's unique atribute) below the tap position of the view, while using NSAttributedString with Core Text Framework?
Using Core Text directly, not a text view? I assume you have a CTFrameRef. You can get the lines and the line origins using CTFrameGetLines() and CTFrameGetLineOrigins(). Find the right line based on its origin and then use CTLineGetStringIndexForPosition() to get the string index.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With