Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
If timeScaleFactor is 0 then exit early. (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverkoey authored Nov 22, 2017
1 parent a8a40ea commit 68456b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/MDMMotionAnimator.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ - (void)animateWithTiming:(MDMMotionTiming)timing
};

CGFloat timeScaleFactor = [self computedTimeScaleFactor];
if (timeScaleFactor == 0) {
exitEarly();
return;
}

CABasicAnimation *animation = MDMAnimationFromTiming(timing, timeScaleFactor);

if (animation == nil) {
Expand Down

0 comments on commit 68456b3

Please sign in to comment.