From 5e75e76e281a6fdf0281cc928c4ffaac4007f5d0 Mon Sep 17 00:00:00 2001 From: RyanLeeLY Date: Fri, 18 May 2018 19:15:02 +0800 Subject: [PATCH] [fix] boundingBox changed after call setText --- FRHyperLabel/FRHyperLabel.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FRHyperLabel/FRHyperLabel.m b/FRHyperLabel/FRHyperLabel.m index 4cc533f..cc1a56b 100644 --- a/FRHyperLabel/FRHyperLabel.m +++ b/FRHyperLabel/FRHyperLabel.m @@ -68,6 +68,18 @@ - (void)checkInitialization { } } +#pragma mark - override + +- (void)setAttributedText:(NSAttributedString *)attributedText { + _boundingBox = CGRectZero; + [super setAttributedText:attributedText]; +} + +- (void)setText:(NSString *)text { + _boundingBox = CGRectZero; + [super setText:text]; +} + #pragma mark - APIs - (void)clearActionDictionary {