Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITapGestureRecognizer doesn't work as expected since XCode 7 beta 2

Tags:

xcode

ios

uikit

I had perfectly working tap handlers before XCode 7 beta 2 which don't work any more. The tap events are not passed to the UIViewController handler functions. I'm using tap handlers on UIImageView (with user interaction enabled) and UIView (which is parent of the topmost view). Does anyone have the same problem? Did Apple changed something regarding event propagation or tap gesture?

NOTE: In the first case (UIImageView) I have another swipe gesture which is still working, in the second case I have just tap gesture

like image 794
devfreak Avatar asked Dec 05 '25 14:12

devfreak


1 Answers

The question is perfectly valid (I have upvoted). And here is the answer, to those people who have down voted this question.

This issue is there in production version of XCode 7.0 as well.

Solution:

Within XCode

1. Select the UIImageView
2. Switch to Attribute Inspector
3. Select Interaction and 'Check' User Interaction Enabled.

If you have connected the gesture, it will work seamlessly.

like image 138
Kajal Sinha Avatar answered Dec 07 '25 04:12

Kajal Sinha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!