kreeger / BDKCollectionIndexView

Gives a UICollectionView the sectionIndexTitles scrub bar that a UITableView gets for almost free.
MIT License
158 stars 29 forks source link

BackgroundView stays highlighted even when gesture gets cancelled #30

Open mickeyl opened 8 years ago

mickeyl commented 8 years ago

This is a problem, e.g. when using the new multitasking feature on the iPad Pro. The proper fix seems to me:

 - (void)handleGesture:(UIGestureRecognizer *)recognizer {
-    [self setBackgroundVisibility:!(recognizer.state == UIGestureRecognizerStateEnded)];
+    [self setBackgroundVisibility:!(recognizer.state == UIGestureRecognizerStateEnded || recognizer.state == UIGestureRecognizerStateCancelled)];