Skip to content

Commit

Permalink
⭐️ Impl: Add CAAnimationMulticastDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 1, 2023
1 parent 20c24eb commit 8d94f81
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// CAAnimationMulticastDelegate.swift
// react-native-ios-modal
//
// Created by Dominic Go on 5/1/23.
//

import Foundation


public class CAAnimationMulticastDelegate: NSObject, CAAnimationDelegate {

public var emitter: RNIMulticastDelegate =
RNIMulticastDelegate<CAAnimationDelegate>();


public func animationDidStart(_ anim: CAAnimation) {
self.emitter.invoke {
$0.animationDidStart?(anim);
};
};

public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
self.emitter.invoke {
$0.animationDidStop?(anim, finished: flag);
};
};
};

0 comments on commit 8d94f81

Please sign in to comment.