From 528e81f91db31684998273e42fd89fd5741ba005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wei=C3=9F?= Date: Mon, 4 Jun 2012 22:29:30 +0200 Subject: [PATCH] The start and end of the animation to not show the text anymore. IMHO this looks cleaner. --- ScrollingAboutWindow/AboutWindowController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ScrollingAboutWindow/AboutWindowController.m b/ScrollingAboutWindow/AboutWindowController.m index 4580e1f..65ea075 100644 --- a/ScrollingAboutWindow/AboutWindowController.m +++ b/ScrollingAboutWindow/AboutWindowController.m @@ -142,7 +142,7 @@ - (void)startCreditsScrollAnimation { if (!self.isCreditsAnimationActive) return; [self startCreditsScrollAnimation]; }]; - creditsLayer.position = CGPointMake(0.0, viewHeight - fadeCompensation); + creditsLayer.position = CGPointMake(0.0, viewHeight + fadeCompensation); [CATransaction commit]; } @@ -158,12 +158,12 @@ - (void)resetCreditsScrollPosition { [CATransaction begin]; [CATransaction setAnimationDuration:0.0]; - creditsLayer.position = CGPointMake(0.0, -textHeight + fadeCompensation); + creditsLayer.position = CGPointMake(0.0, -textHeight - fadeCompensation); [CATransaction commit]; } - (CGFloat)creditsFadeHeightCompensation { - return self.creditsTopFadeLayer.frame.size.height - 2.0; + return self.creditsTopFadeLayer.frame.size.height; } #pragma mark - Core Animation layers