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

Commit 71d22e2

Browse files
authored
Add public/private marks to the animator implementation. (#70)
* Add public/private marks to the animator implementation. This will help organize some upcoming work on the animator's implementation. * Reordered.
1 parent f743ca0 commit 71d22e2

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/MDMMotionAnimator.m

+11-9
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ - (void)addCoreAnimationTracer:(void (^)(CALayer *, CAAnimation *))tracer {
150150
[_tracers addObject:[tracer copy]];
151151
}
152152

153+
- (void)removeAllAnimations {
154+
[_registrar removeAllAnimations];
155+
}
156+
157+
- (void)stopAllAnimations {
158+
[_registrar commitCurrentAnimationValuesToAllLayers];
159+
[_registrar removeAllAnimations];
160+
}
161+
162+
#pragma mark - Private
163+
153164
- (CGFloat)computedTimeScaleFactor {
154165
CGFloat timeScaleFactor;
155166
id transactionTimeScaleFactor = [CATransaction mdm_timeScaleFactor];
@@ -166,13 +177,4 @@ - (CGFloat)computedTimeScaleFactor {
166177
return MDMSimulatorAnimationDragCoefficient() * timeScaleFactor;
167178
}
168179

169-
- (void)removeAllAnimations {
170-
[_registrar removeAllAnimations];
171-
}
172-
173-
- (void)stopAllAnimations {
174-
[_registrar commitCurrentAnimationValuesToAllLayers];
175-
[_registrar removeAllAnimations];
176-
}
177-
178180
@end

0 commit comments

Comments
 (0)