Thanks for open sourcing PSPDFTextView @steipete. It saved me quite a lot of time.
textViewDidChangeSelection: was causing unwanted animations that conflicted with my own. The way I see it, when I’m manually setting the text I don’t want any automatic animations or scroll changes, and I can trigger those manually if I need them.
WARNING: this pull request is not backwards-compatible, as before PSPDFTextView was scrolling to the end* when setting the text and to the end of the selection when setting it. With this commit PSPDFTextView just stays where it is.
* Not exactly the end, as it might be missing to account the textContainerInset. This is most likely is a bug.
Thanks for open sourcing PSPDFTextView @steipete. It saved me quite a lot of time.
textViewDidChangeSelection:
was causing unwanted animations that conflicted with my own. The way I see it, when I’m manually setting the text I don’t want any automatic animations or scroll changes, and I can trigger those manually if I need them.WARNING: this pull request is not backwards-compatible, as before PSPDFTextView was scrolling to the end* when setting the text and to the end of the selection when setting it. With this commit PSPDFTextView just stays where it is.
* Not exactly the end, as it might be missing to account the
textContainerInset
. This is most likely is a bug.