diff --git a/ios/RiveReactNativeView.swift b/ios/RiveReactNativeView.swift index b2406b6..98256c5 100644 --- a/ios/RiveReactNativeView.swift +++ b/ios/RiveReactNativeView.swift @@ -178,8 +178,12 @@ class RiveReactNativeView: UIView, PlayDelegate, PauseDelegate, StopDelegate, Lo } - @objc func pause() { - riveView.pause() + func pause(animationNames: [String], areStateMachines: Bool) { + if animationNames.isEmpty { + riveView.pause() + } else { + riveView.pause(animationNames: animationNames, isStateMachine: areStateMachines) + } } // func updateArtboard(_ artboard: RiveArtboard) { diff --git a/ios/RiveReactNativeViewManager.swift b/ios/RiveReactNativeViewManager.swift index b051ea6..4599c0a 100644 --- a/ios/RiveReactNativeViewManager.swift +++ b/ios/RiveReactNativeViewManager.swift @@ -20,7 +20,7 @@ class RiveReactNativeViewManager: RCTViewManager { @objc func pause(_ node: NSNumber, animationNames: [String], areStateMachines: Bool) { DispatchQueue.main.async { let component = self.bridge.uiManager.view(forReactTag: node) as! RiveReactNativeView - component.pause() + component.pause(animationNames: animationNames, areStateMachines: areStateMachines) } }