Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug: User tap on notif banner with callback cannot dismiss it #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions Pod/Classes/TSMessageView.m
Expand Up @@ -343,10 +343,12 @@ - (id)initWithTitle:(NSString *)title
UISwipeGestureRecognizerDirectionUp :
UISwipeGestureRecognizerDirectionDown)];
[self addGestureRecognizer:gestureRec];

UITapGestureRecognizer *tapRec = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(fadeMeOut)];
[self addGestureRecognizer:tapRec];

if (! self.callback) {
UITapGestureRecognizer *tapRec = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(fadeMeOut)];
[self addGestureRecognizer:tapRec];
}
}

if (self.callback) {
Expand Down Expand Up @@ -507,6 +509,7 @@ - (void)handleTap:(UITapGestureRecognizer *)tapGesture
self.callback();
}
}
[self fadeMeOut];
}

#pragma mark - UIGestureRecognizerDelegate
Expand Down