Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Source/UIScrollView+EmptyDataSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,13 @@ - (void)swizzleIfPossible:(SEL)selector

#pragma mark - UIGestureRecognizerDelegate Methods

// This is necessary to allow touches to pass through to any UIControl that is tapped within a custom view. Otherwise,
// the tap gesture on the DZNEmptyDataSetView gets the touch first which isn't the desired behaviour. The tap gesture
// should only get touch events if the view that was tapped is not a UIControl
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
return ![touch.view isKindOfClass:[UIControl class]];
}

- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
if ([gestureRecognizer.view isEqual:self.emptyDataSetView]) {
Expand Down