-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐️ Impl: Add
CAAnimationMulticastDelegate
- Loading branch information
1 parent
20c24eb
commit 8d94f81
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
ios/src_library/React Native/RNIMulticastDelegate/CAAnimationMulticastDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}; | ||
}; | ||
}; |