GT2/Ejectable/node_modules/react-native-reanimated/ios/Transitioning/REATransitionValues.m

27 lines
720 B
Mathematica
Raw Normal View History

2021-08-16 00:14:59 +00:00
#import <React/RCTView.h>
#import <React/RCTViewManager.h>
#import "REATransition.h"
#import "REATransitionValues.h"
@implementation REATransitionValues
- (instancetype)initWithView:(UIView *)view forRoot:(UIView *)root
{
if (self = [super init]) {
_view = view;
_parent = view.superview;
_reactParent = view.reactSuperview;
while (_reactParent != nil && _reactParent != root && IS_LAYOUT_ONLY(_reactParent)) {
_reactParent = _reactParent.reactSuperview;
}
_center = view.center;
_bounds = view.bounds;
_centerRelativeToRoot = [_parent convertPoint:_center toView:root];
_centerInReactParent = [_parent convertPoint:_center toView:_reactParent];
}
return self;
}
@end