Re: Crash in dragImageForSelection
Gary L. Wade wrote on 27/4/19 02:07:
The bug in documentation has been reported.Doesn't seem to help.
On Apr 26, 2019, at 11:51 AM, Ben Kennedy <ben-groups@...> wrote:Yes, it's a result of various ways of setting the range correctly. I've fixed it so it looks nicer.First of all, you're treating textView as an optional sometimes, and force-unwrapping it elsewhere. Prefacing the whole block with a `guard` or `if let` would clean this up.
Yes, the range is correct after calling setSelectedRange.More on topic, I looked up the documentation for `setSelectedRange()`, and it is strange:
I wonder if the answer is to draw my own drag image...
Mussau-Emira language, New Ireland Province, Papua New Guinea