From a902445203a5d99fa360792cba8c53e05d7c8393 Mon Sep 17 00:00:00 2001 From: vvveiii Date: Thu, 13 Aug 2020 18:18:09 +0800 Subject: [PATCH] =?UTF-8?q?[YogaKit]=20pixel-align=20view=E2=80=99s=20fram?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YogaKit/Source/YGLayout.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m index c7e324d2..fad988d5 100644 --- a/YogaKit/Source/YGLayout.m +++ b/YogaKit/Source/YGLayout.m @@ -527,14 +527,14 @@ static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) { }, .size = { - .width = MAX(YGRoundPixelValue(bottomRight.x - topLeft.x), 0), - .height = MAX(YGRoundPixelValue(bottomRight.y - topLeft.y), 0), + .width = MAX(bottomRight.x - topLeft.x, 0), + .height = MAX(bottomRight.y - topLeft.y, 0), }, }; view.bounds = (CGRect) { .origin = view.bounds.origin, - .size = frame.size + .size = CGSizeMake(YGRoundPixelValue(CGRectGetWidth(frame)), YGRoundPixelValue(CGRectGetHeight(frame))) }; view.center = (CGPoint) {