From ebf144d652dfc85233f2e47d9c4094d940e5eb50 Mon Sep 17 00:00:00 2001 From: Podsapoom Buatun Date: Tue, 26 Jan 2016 18:15:38 +0700 Subject: [PATCH] fix frameRect to correct lineOrigins --- ZCAnimatedLabel/ZCAnimatedLabel/ZCCoreTextLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZCAnimatedLabel/ZCAnimatedLabel/ZCCoreTextLayout.m b/ZCAnimatedLabel/ZCAnimatedLabel/ZCCoreTextLayout.m index 96b3ff3..3a71df2 100644 --- a/ZCAnimatedLabel/ZCAnimatedLabel/ZCCoreTextLayout.m +++ b/ZCAnimatedLabel/ZCAnimatedLabel/ZCCoreTextLayout.m @@ -118,7 +118,7 @@ - (void) layoutWithAttributedString: (NSAttributedString *) attributedString con self.estimatedSize = s; - frameRect = CGRectMake(0, 0, s.width, s.height); + frameRect = CGRectMake(0, 0, size.width, size.height); CGPathRef framePath = CGPathCreateWithRect(frameRect, NULL); ctFrame = CTFramesetterCreateFrame(framesetter, rangeAll, framePath, NULL); CGPathRelease(framePath);