From 8e8a05c4871ec62880bca6cd0cfb2d5771451bd2 Mon Sep 17 00:00:00 2001 From: Natan Rolnik Date: Mon, 13 May 2019 15:45:49 +0300 Subject: [PATCH] Trigger actions for `UIControlEventPrimaryActionTriggered` upon touch up inside --- TORoundedButton/TORoundedButton.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TORoundedButton/TORoundedButton.m b/TORoundedButton/TORoundedButton.m index 0caba11..a681d71 100644 --- a/TORoundedButton/TORoundedButton.m +++ b/TORoundedButton/TORoundedButton.m @@ -257,6 +257,8 @@ - (void)didTouchUpInside [self setBackgroundColorTappedAnimated:YES]; [self setButtonScaledTappedAnimated:YES]; + [self sendActionsForControlEvents:UIControlEventPrimaryActionTriggered]; + if (self.tappedHandler) { self.tappedHandler(); } }