Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Revert #259 #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

colinhumber
Copy link
Contributor

@colinhumber colinhumber commented Jul 1, 2017

If a custom view has a UIControl subclass, the -gestureRecognizer:shouldReceiveTouch: call is necessary to allow touches to pass through to the control immediately. Without this call, touches are delayed, and the touch up action on the control doesn't fire unless the control is tapped for an extended period of time.

The call here is checking to see if the tap gesture on the DZNEmptyDataSetView should receive touches. If the tapped view is a UIControl, the gesture recognizer shouldn't receive any touches and should instead pass them along to the UIControl for processing.

@dzenbot
Copy link
Owner

dzenbot commented Jan 24, 2018

I know this is old, but didn't we intentionally revert this time ago, because of ce506bd ? I'm so confused with these changes 🤦‍♂️

@colinhumber
Copy link
Contributor Author

That code was added in ce506bd but was then removed in 3d2d8b5 for some reason, which broke taps being allowed on UIControls. This PR reimplements that behaviour.

There's no additional info on the commit that removed that behaviour, other than it was "unnecessary code".

If a custom view has a UIControl subclass, the -gestureRecognizer:shouldReceiveTouch: call is necessary to allow touches to pass through to the control immediately. Without this call, touches are delayed, and the touch up action on the control doesn't fire unless the control is tapped for an extended period of time.

The call here is checking to see if the tap gesture on the DZNEmptyDataSetView should receive touches. If the tapped view is a UIControl, the gesture recognizer shouldn't receive any touches and should instead pass them along to the UIControl for processing.
@colinhumber colinhumber force-pushed the fix-uicontrol-touches-not-working branch from d4f20a4 to 7ef22be Compare January 27, 2018 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants