mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
Fabric: RCTViewComponentView, storing just applied layoutMetrics
Summary: This will be useful for this class and for subclasses soon. For instance, when we draw something in `drawRect:`, we need to know exact content frame for rendering. Reviewed By: mdvacca Differential Revision: D7751855 fbshipit-source-id: 5d688368edd7b4f3c8c19d54ca701a9cc361270b
This commit is contained in:
parent
7e97ed00bc
commit
9646c5cb3c
@ -9,13 +9,17 @@
|
|||||||
|
|
||||||
#import <React/RCTComponentViewProtocol.h>
|
#import <React/RCTComponentViewProtocol.h>
|
||||||
#import <React/UIView+ComponentViewProtocol.h>
|
#import <React/UIView+ComponentViewProtocol.h>
|
||||||
|
#import <fabric/core/LayoutMetrics.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UIView class for <View> component.
|
* UIView class for <View> component.
|
||||||
*/
|
*/
|
||||||
@interface RCTViewComponentView : UIView <RCTComponentViewProtocol>
|
@interface RCTViewComponentView : UIView <RCTComponentViewProtocol> {
|
||||||
|
@protected
|
||||||
|
facebook::react::LayoutMetrics _layoutMetrics;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -30,4 +30,12 @@ using namespace facebook::react;
|
|||||||
// TODO: Implement all sutable non-layout <View> props.
|
// TODO: Implement all sutable non-layout <View> props.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateLayoutMetrics:(LayoutMetrics)layoutMetrics
|
||||||
|
oldLayoutMetrics:(LayoutMetrics)oldLayoutMetrics
|
||||||
|
{
|
||||||
|
[super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics];
|
||||||
|
|
||||||
|
_layoutMetrics = layoutMetrics;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user