2016-11-28 11:09:46 -08:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-11-28 11:09:46 -08:00
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-11-28 11:09:46 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <React/RCTBridgeModule.h>
|
2017-03-09 15:16:01 -08:00
|
|
|
#import <React/RCTUIManager.h>
|
2016-11-28 11:09:46 -08:00
|
|
|
|
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 13:23:12 -07:00
|
|
|
@protocol RCTValueAnimatedNodeObserver;
|
|
|
|
|
2016-11-28 11:09:46 -08:00
|
|
|
@interface RCTNativeAnimatedNodesManager : NSObject
|
|
|
|
|
|
|
|
- (nonnull instancetype)initWithUIManager:(nonnull RCTUIManager *)uiManager;
|
|
|
|
|
|
|
|
- (void)updateAnimations;
|
|
|
|
|
2017-03-28 09:08:51 -07:00
|
|
|
- (void)stepAnimations:(nonnull CADisplayLink *)displaylink;
|
|
|
|
|
2016-11-28 11:09:46 -08:00
|
|
|
// graph
|
|
|
|
|
|
|
|
- (void)createAnimatedNode:(nonnull NSNumber *)tag
|
|
|
|
config:(NSDictionary<NSString *, id> *__nonnull)config;
|
|
|
|
|
|
|
|
- (void)connectAnimatedNodes:(nonnull NSNumber *)parentTag
|
|
|
|
childTag:(nonnull NSNumber *)childTag;
|
|
|
|
|
|
|
|
- (void)disconnectAnimatedNodes:(nonnull NSNumber *)parentTag
|
|
|
|
childTag:(nonnull NSNumber *)childTag;
|
|
|
|
|
|
|
|
- (void)connectAnimatedNodeToView:(nonnull NSNumber *)nodeTag
|
2017-01-26 18:14:40 -08:00
|
|
|
viewTag:(nonnull NSNumber *)viewTag
|
|
|
|
viewName:(nonnull NSString *)viewName;
|
2016-11-28 11:09:46 -08:00
|
|
|
|
2017-05-25 06:02:35 -07:00
|
|
|
- (void)restoreDefaultValues:(nonnull NSNumber *)nodeTag;
|
|
|
|
|
2016-11-28 11:09:46 -08:00
|
|
|
- (void)disconnectAnimatedNodeFromView:(nonnull NSNumber *)nodeTag
|
|
|
|
viewTag:(nonnull NSNumber *)viewTag;
|
|
|
|
|
|
|
|
- (void)dropAnimatedNode:(nonnull NSNumber *)tag;
|
|
|
|
|
|
|
|
// mutations
|
|
|
|
|
|
|
|
- (void)setAnimatedNodeValue:(nonnull NSNumber *)nodeTag
|
|
|
|
value:(nonnull NSNumber *)value;
|
|
|
|
|
|
|
|
- (void)setAnimatedNodeOffset:(nonnull NSNumber *)nodeTag
|
|
|
|
offset:(nonnull NSNumber *)offset;
|
|
|
|
|
|
|
|
- (void)flattenAnimatedNodeOffset:(nonnull NSNumber *)nodeTag;
|
|
|
|
|
|
|
|
- (void)extractAnimatedNodeOffset:(nonnull NSNumber *)nodeTag;
|
|
|
|
|
|
|
|
// drivers
|
|
|
|
|
|
|
|
- (void)startAnimatingNode:(nonnull NSNumber *)animationId
|
|
|
|
nodeTag:(nonnull NSNumber *)nodeTag
|
|
|
|
config:(NSDictionary<NSString *, id> *__nonnull)config
|
|
|
|
endCallback:(nullable RCTResponseSenderBlock)callBack;
|
|
|
|
|
|
|
|
- (void)stopAnimation:(nonnull NSNumber *)animationId;
|
|
|
|
|
2017-01-05 21:48:10 -08:00
|
|
|
- (void)stopAnimationLoop;
|
|
|
|
|
2016-11-28 11:09:46 -08:00
|
|
|
// events
|
|
|
|
|
|
|
|
- (void)addAnimatedEventToView:(nonnull NSNumber *)viewTag
|
|
|
|
eventName:(nonnull NSString *)eventName
|
|
|
|
eventMapping:(NSDictionary<NSString *, id> *__nonnull)eventMapping;
|
|
|
|
|
|
|
|
- (void)removeAnimatedEventFromView:(nonnull NSNumber *)viewTag
|
2017-03-09 15:16:01 -08:00
|
|
|
eventName:(nonnull NSString *)eventName
|
|
|
|
animatedNodeTag:(nonnull NSNumber *)animatedNodeTag;
|
2016-11-28 11:09:46 -08:00
|
|
|
|
|
|
|
- (void)handleAnimatedEvent:(nonnull id<RCTEvent>)event;
|
|
|
|
|
|
|
|
// listeners
|
|
|
|
|
|
|
|
- (void)startListeningToAnimatedNodeValue:(nonnull NSNumber *)tag
|
|
|
|
valueObserver:(nonnull id<RCTValueAnimatedNodeObserver>)valueObserver;
|
|
|
|
|
2017-03-28 09:08:51 -07:00
|
|
|
- (void)stopListeningToAnimatedNodeValue:(nonnull NSNumber *)tag;
|
2016-11-28 11:09:46 -08:00
|
|
|
|
|
|
|
@end
|