FloatingPanel icon indicating copy to clipboard operation
FloatingPanel copied to clipboard

Floating panel & UITapGestureRecognizer

Open attheodo opened this issue 5 years ago • 7 comments

Hello,

I am trying to add a tap gesture recognizer on floating panel controller, in order to show/hide it vs just relying on swiping.

I've tried adding it directly on the surface view, as recommended to you here: https://github.com/SCENEE/FloatingPanel/issues/64#issuecomment-442289328

... but unfortunately, the issue I opened then still exists.

The gesture recognizer intercepts taps on the underlying collection view.

Any ideas on how to work around that?

attheodo avatar Mar 08 '19 12:03 attheodo

This issue looks the same as here, https://stackoverflow.com/questions/34944670/didselectrowatindexpath-is-in-conflict-with-tap-gesture-recognizer. Could you please try tapGestureRecognizer.cancelsTouchesInView = false ?

scenee avatar Mar 19 '19 23:03 scenee

@SCENEE unfortunately even with cancelsTouchesInView: false, the issue persists.

attheodo avatar Mar 25 '19 15:03 attheodo

I'm wondering if it's the panel issue. Could you please try to repro your problem with a panel disabled the FloatingPanelController.panGestureRecognizer as following?

fpc.panGestureRecognizer.isEnabled = false

scenee avatar Apr 20 '19 06:04 scenee

@SCENEE looks like the problem persists even with the panGestureRecognizer disabled

attheodo avatar May 09 '19 11:05 attheodo

@attheodo, Ok, I might not understand your issue correctly. By the way, I added change tap gesture handling in PR#201(merged to master already). I hope it would resolve your issue. If not, could you please let me know more detail? (It's helpful for you to follow the issue template)

scenee avatar May 11 '19 04:05 scenee

pod 'FloatingPanel', '~> 2.0.0-beta.1' has same issue @SCENEE

make2a avatar Aug 27 '20 10:08 make2a

This doesn't look the lib's issue, but this issue is related to a collision with a UITapGestureRecognizer added in the surface of a panel and UICollectionViewCell selection. The collision can be resolved by using a UIGestureRecognizerDelegate delegate object of its UITapGestureRecognizer to distinguish with an area to invoke a tap of its UITapGestureRecognizer.

scenee avatar Sep 05 '20 04:09 scenee