Skip to content

Commit

Permalink
The start and end of the animation to not show the text anymore.
Browse files Browse the repository at this point in the history
IMHO this looks cleaner.
  • Loading branch information
Jan Weiß committed Jun 22, 2012
1 parent 99ace56 commit 528e81f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ScrollingAboutWindow/AboutWindowController.m
Expand Up @@ -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];
}

Expand All @@ -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
Expand Down

0 comments on commit 528e81f

Please sign in to comment.