From 844f678bd8fadee25dbccb08e9a8b9e826c3c386 Mon Sep 17 00:00:00 2001 From: zzyong Date: Wed, 11 Mar 2020 15:43:49 +0800 Subject: [PATCH] Fix YYLabel highlight fade bug When call "touchesCancelled: withEvent:", fadeOnHighlight is always YES, which cause highlight content faded in reusing --- YYText/YYLabel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YYText/YYLabel.m b/YYText/YYLabel.m index f5656e9a..739bca2f 100644 --- a/YYText/YYLabel.m +++ b/YYText/YYLabel.m @@ -235,7 +235,7 @@ - (void)_removeHighlightAnimated:(BOOL)animated { - (void)_endTouch { [self _endLongPressTimer]; - [self _removeHighlightAnimated:YES]; + [self _removeHighlightAnimated:_fadeOnHighlight]; _state.trackingTouch = NO; }