Closed rinatkhanov closed 9 years ago
Thanks, @rinatkhanov! I'll review this this weekend and see about merging this in.
@rinatkhanov better late than never βΒ thanks for this!
This is now available in v2.0.0.
https://github.com/kreeger/BDKCollectionIndexView/releases/tag/v2.0.0
OK, cool π
Original implementation of handling long press gesture with
touchesBegan
wasn't very reliable in my experience (though it works fine in the example project). Specifically,touchesEnded
method wasn't called after long press in some cases and index view seemed "stuck" with enabled highlighted background (I've tried addingtouchesCanceled
method too, but I still wasn't satisfied with the result β the background would blink the moment "long press" turns into pan gesture).The solution for me was to replace
touchesBegan
/touchesEnded
methods with simpleUILongPressGestureRecognizer
and one delegate method. Everything else works the same, but background always un-highlights when you lift the finger and gesture handling is more concise now.P.S. Thanks for the project. π