Please take a look at
if velocity.y < 100 { /// dragging up
It should be
if velocity.y < -100 { /// dragging up
As I understand this is for fast dragging which should always select the next point in direction of the drag instead of find the closes point, which could mean going back a bit.
Having the sheet almost closed (dragged to bottom) and then moving slightly (not matter if up or down) of speed of 5 or -5, it will be below 100 and interpreted as fast drag up, which it is not. It would be a drag up, if velocity was negative and it would be a fast drag up, if velocity was below -100.
Please take a look at
if velocity.y < 100 { /// dragging up
It should beif velocity.y < -100 { /// dragging up
As I understand this is for fast dragging which should always select the next point in direction of the drag instead of find the closes point, which could mean going back a bit.
Having the sheet almost closed (dragged to bottom) and then moving slightly (not matter if up or down) of speed of 5 or -5, it will be below 100 and interpreted as fast drag up, which it is not. It would be a drag up, if velocity was negative and it would be a fast drag up, if velocity was below -100.