mirror of
https://github.com/status-im/react-native.git
synced 2025-01-21 06:49:39 +00:00
0e204e1141
Summary: Adds support for `Animated.Value#addListener` for native driven animated values. Same as #8844 but for iOS. This depends on some JS code in #8844 so only review the 2nd commit and let's wait for #8844 to land first. **Test plan** Tested using the UIExplorer example. Closes https://github.com/facebook/react-native/pull/9194 Differential Revision: D3681749 fbshipit-source-id: 521a61e2221c1ad1f6f40c75dd2dc957361d0271
27 lines
710 B
Objective-C
27 lines
710 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "RCTAnimatedNode.h"
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@class RCTValueAnimatedNode;
|
|
|
|
@protocol RCTValueAnimatedNodeObserver <NSObject>
|
|
|
|
- (void)animatedNode:(RCTValueAnimatedNode *)node didUpdateValue:(CGFloat)value;
|
|
|
|
@end
|
|
|
|
@interface RCTValueAnimatedNode : RCTAnimatedNode
|
|
|
|
@property (nonatomic, assign) CGFloat value;
|
|
@property (nonatomic, weak) id<RCTValueAnimatedNodeObserver> valueObserver;
|
|
|
|
@end
|