2024-05-02 15:08:24 +00:00
|
|
|
#import <QuartzCore/QuartzCore.h>
|
2024-10-29 07:36:43 +00:00
|
|
|
#import <RNReanimated/REATransitionAnimation.h>
|
|
|
|
#import <RNReanimated/REATransitionValues.h>
|
2024-05-02 15:08:24 +00:00
|
|
|
#import <React/RCTView.h>
|
2024-10-29 07:36:43 +00:00
|
|
|
#import <UIKit/UIKit.h>
|
2024-05-02 15:08:24 +00:00
|
|
|
|
|
|
|
// TODO: fix below implementation
|
|
|
|
#define IS_LAYOUT_ONLY(view) ([view isKindOfClass:[RCTView class]] && view.backgroundColor == nil)
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, REATransitionType) {
|
|
|
|
REATransitionTypeNone = 0,
|
|
|
|
REATransitionTypeGroup,
|
|
|
|
REATransitionTypeIn,
|
|
|
|
REATransitionTypeOut,
|
|
|
|
REATransitionTypeChange
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, REATransitionAnimationType) {
|
|
|
|
REATransitionAnimationTypeNone = 0,
|
|
|
|
REATransitionAnimationTypeFade,
|
|
|
|
REATransitionAnimationTypeScale,
|
|
|
|
REATransitionAnimationTypeSlideTop,
|
|
|
|
REATransitionAnimationTypeSlideBottom,
|
|
|
|
REATransitionAnimationTypeSlideRight,
|
|
|
|
REATransitionAnimationTypeSlideLeft,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, REATransitionInterpolationType) {
|
|
|
|
REATransitionInterpolationLinear = 0,
|
|
|
|
REATransitionInterpolationEaseIn,
|
|
|
|
REATransitionInterpolationEaseOut,
|
|
|
|
REATransitionInterpolationEaseInOut,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, REATransitionPropagationType) {
|
|
|
|
REATransitionPropagationNone = 0,
|
|
|
|
REATransitionPropagationTop,
|
|
|
|
REATransitionPropagationBottom,
|
|
|
|
REATransitionPropagationLeft,
|
|
|
|
REATransitionPropagationRight,
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface REATransition : NSObject
|
|
|
|
@property (nonatomic, weak) REATransition *parent;
|
|
|
|
@property (nonatomic) CFTimeInterval duration;
|
|
|
|
@property (nonatomic) CFTimeInterval delay;
|
|
|
|
@property (nonatomic) REATransitionInterpolationType interpolation;
|
|
|
|
@property (nonatomic) REATransitionPropagationType propagation;
|
|
|
|
- (instancetype)initWithConfig:(NSDictionary *)config;
|
|
|
|
- (CAMediaTimingFunction *)mediaTiming;
|
|
|
|
- (void)startCaptureInRoot:(UIView *)root;
|
|
|
|
- (void)playInRoot:(UIView *)root;
|
|
|
|
- (REATransitionValues *)findStartValuesForKey:(NSNumber *)key;
|
|
|
|
- (REATransitionValues *)findEndValuesForKey:(NSNumber *)key;
|
2024-10-29 07:36:43 +00:00
|
|
|
- (REATransitionAnimation *)animationForTransitioning:(REATransitionValues *)startValues
|
|
|
|
endValues:(REATransitionValues *)endValues
|
|
|
|
forRoot:(UIView *)root;
|
|
|
|
- (NSArray<REATransitionAnimation *> *)
|
|
|
|
animationsForTransitioning:(NSMutableDictionary<NSNumber *, REATransitionValues *> *)startValues
|
|
|
|
endValues:(NSMutableDictionary<NSNumber *, REATransitionValues *> *)endValues
|
|
|
|
forRoot:(UIView *)root;
|
2024-05-02 15:08:24 +00:00
|
|
|
|
|
|
|
+ (REATransition *)inflate:(NSDictionary *)config;
|
|
|
|
@end
|