mirror of
https://github.com/status-im/react-native.git
synced 2025-01-11 01:56:26 +00:00
d950db4ef7
Summary: This diff adds support for native spring animations on iOS. This overlaps some spring work done by kmagiera on the Android side of things. **Test plan (required)** Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the spring examples. Closes https://github.com/facebook/react-native/pull/9048 Differential Revision: D4056088 Pulled By: foghina fbshipit-source-id: a593408cb61cb850572bab4a0884f7157cece656
38 lines
1.1 KiB
Objective-C
38 lines
1.1 KiB
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 <CoreGraphics/CoreGraphics.h>
|
|
#import "RCTBridgeModule.h"
|
|
|
|
@class RCTValueAnimatedNode;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@protocol RCTAnimationDriver <NSObject>
|
|
|
|
@property (nonatomic, readonly) NSNumber *animationId;
|
|
@property (nonatomic, readonly) RCTValueAnimatedNode *valueNode;
|
|
@property (nonatomic, readonly) BOOL animationHasBegun;
|
|
@property (nonatomic, readonly) BOOL animationHasFinished;
|
|
|
|
- (instancetype)initWithId:(NSNumber *)animationId
|
|
config:(NSDictionary *)config
|
|
forNode:(RCTValueAnimatedNode *)valueNode
|
|
callBack:(nullable RCTResponseSenderBlock)callback;
|
|
|
|
- (void)startAnimation;
|
|
- (void)stopAnimation;
|
|
- (void)stepAnimation;
|
|
- (void)removeAnimation;
|
|
- (void)cleanupAnimationUpdate;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|