Introduced -[RCTShadowView contentFrame]
Summary: Another trivial sugar/helper to access computed by Yoga layout metrics. We will use it soon in the new Text render/layout engine. Reviewed By: mmmulani Differential Revision: D6671979 fbshipit-source-id: d36933415c2fa50bae5cc171434d8f0b281955b7
This commit is contained in:
parent
193a2bd4cd
commit
6882132421
|
@ -26,6 +26,7 @@ RCT_EXTERN CGFloat RCTCoreGraphicsFloatFromYogaFloat(float value);
|
|||
@property (nonatomic, readonly) UIEdgeInsets borderAsInsets;
|
||||
@property (nonatomic, readonly) UIEdgeInsets compoundInsets;
|
||||
@property (nonatomic, readonly) CGSize availableSize;
|
||||
@property (nonatomic, readonly) CGRect contentFrame;
|
||||
|
||||
#pragma mark - Measuring
|
||||
|
||||
|
|
|
@ -81,6 +81,12 @@ CGFloat RCTCoreGraphicsFloatFromYogaFloat(float value)
|
|||
return UIEdgeInsetsInsetRect((CGRect){CGPointZero, self.frame.size}, self.compoundInsets).size;
|
||||
}
|
||||
|
||||
- (CGRect)contentFrame
|
||||
{
|
||||
CGRect bounds = (CGRect){CGPointZero, self.frame.size};
|
||||
return UIEdgeInsetsInsetRect(bounds, self.compoundInsets);
|
||||
}
|
||||
|
||||
#pragma mark - Measuring
|
||||
|
||||
- (CGSize)sizeThatFitsMinimumSize:(CGSize)minimumSize maximumSize:(CGSize)maximumSize
|
||||
|
|
Loading…
Reference in New Issue