Thanks Tarun, and for a great and clear presentation video!
Regarding line numbering, I've seen the sample code from this year.
If I wanted to animate the toggle, something like
UIView.animate {
textViewportLayoutController.layoutViewport()
}
after textViewportLayoutControllerReceivedSetNeedsLayout() seems reasonable?
Currently paragraphs are flying around if I try it but I'm guessing that's some caching/index reuse?
And regarding NSTextStorage, would it be possible to hold some kind of double-booking wherein I get a fast layout pass of the actual text as single run, and only adjust the color attributes for the viewport? (assuming I already keep the tokenized metadata separately for each run)
Topic:
UIKit
SubTopic:
UIKit Q&A