Skip to content

Commit

Permalink
Only allow pausing when conditions are appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
cbpowell committed Dec 12, 2015
1 parent b166cb4 commit baaa1fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MarqueeLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,8 @@ - (void)shutdownLabel {

-(void)pauseLabel
{
if (!self.isPaused) {
// Only pause if label is not already paused, and already in a scrolling animation
if (!self.isPaused && self.awayFromHome) {
// Pause sublabel position animation
CFTimeInterval labelPauseTime = [self.subLabel.layer convertTime:CACurrentMediaTime() fromLayer:nil];
self.subLabel.layer.speed = 0.0;
Expand Down

0 comments on commit baaa1fa

Please sign in to comment.