react-native-macos/Libraries/NativeAnimation/RCTNativeAnimatedNodesManag...

99 строки
2.9 KiB
C
Исходник Обычный вид История

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTUIManager.h>
#import <React/RCTSurfacePresenterStub.h>
#import <React/RCTEventDispatcherProtocol.h>
Correct RCTAnimation import (#18050) Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR https://github.com/facebook/react-native/pull/16192 PR https://github.com/facebook/react-native/pull/16271 PR https://github.com/facebook/react-native/pull/17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR https://github.com/facebook/react-native/pull/16192 PR https://github.com/facebook/react-native/pull/16271 PR https://github.com/facebook/react-native/pull/17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: https://github.com/facebook/react-native/pull/18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
2018-09-11 23:23:12 +03:00
@protocol RCTValueAnimatedNodeObserver;
NS_ASSUME_NONNULL_BEGIN
@interface RCTNativeAnimatedNodesManager : NSObject
- (nonnull instancetype)initWithBridge:(nullable RCTBridge *)bridge
surfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter;
- (void)updateAnimations;
- (void)stepAnimations:(CADisplayLink *)displaylink;
- (BOOL)isNodeManagedByFabric:(NSNumber *)tag;
- (void)getValue:(NSNumber *)nodeTag
saveCallback:(RCTResponseSenderBlock)saveCallback;
// graph
- (void)createAnimatedNode:(NSNumber *)tag
config:(NSDictionary<NSString *, id> *)config;
- (void)connectAnimatedNodes:(NSNumber *)parentTag
childTag:(NSNumber *)childTag;
- (void)disconnectAnimatedNodes:(NSNumber *)parentTag
childTag:(NSNumber *)childTag;
- (void)connectAnimatedNodeToView:(NSNumber *)nodeTag
viewTag:(NSNumber *)viewTag
viewName:(nullable NSString *)viewName;
- (void)restoreDefaultValues:(NSNumber *)nodeTag;
- (void)disconnectAnimatedNodeFromView:(NSNumber *)nodeTag
viewTag:(NSNumber *)viewTag;
- (void)dropAnimatedNode:(NSNumber *)tag;
// mutations
- (void)setAnimatedNodeValue:(NSNumber *)nodeTag
value:(NSNumber *)value;
- (void)setAnimatedNodeOffset:(NSNumber *)nodeTag
offset:(NSNumber *)offset;
- (void)flattenAnimatedNodeOffset:(NSNumber *)nodeTag;
- (void)extractAnimatedNodeOffset:(NSNumber *)nodeTag;
// drivers
- (void)startAnimatingNode:(NSNumber *)animationId
nodeTag:(NSNumber *)nodeTag
config:(NSDictionary<NSString *, id> *)config
endCallback:(nullable RCTResponseSenderBlock)callBack;
- (void)stopAnimation:(NSNumber *)animationId;
- (void)stopAnimationLoop;
// events
- (void)addAnimatedEventToView:(NSNumber *)viewTag
eventName:(NSString *)eventName
eventMapping:(NSDictionary<NSString *, id> *)eventMapping;
- (void)removeAnimatedEventFromView:(NSNumber *)viewTag
eventName:(NSString *)eventName
animatedNodeTag:(NSNumber *)animatedNodeTag;
- (void)handleAnimatedEvent:(id<RCTEvent>)event;
// listeners
- (void)startListeningToAnimatedNodeValue:(NSNumber *)tag
valueObserver:(id<RCTValueAnimatedNodeObserver>)valueObserver;
- (void)stopListeningToAnimatedNodeValue:(NSNumber *)tag;
@end
NS_ASSUME_NONNULL_END