Expose calculateLayoutWithSize in YogaKit
Summary: calculateLayoutWithSize: can be useful when calculating table/collection view sizes before the views are fully laid out by UIKit. Closes https://github.com/facebook/yoga/pull/558 Differential Revision: D5104863 Pulled By: emilsjolander fbshipit-source-id: e0e0c6d502f6745be8d84de8c1b6e24cc25a0352
This commit is contained in:
committed by
Facebook Github Bot
parent
e9e1e084da
commit
2fb01daf70
@@ -271,8 +271,6 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
return [self calculateLayoutWithSize:constrainedSize];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (CGSize)calculateLayoutWithSize:(CGSize)size
|
||||
{
|
||||
NSAssert([NSThread isMainThread], @"Yoga calculation must be done on main.");
|
||||
@@ -293,6 +291,8 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
};
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
static YGSize YGMeasureView(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
|
Reference in New Issue
Block a user