【YogaKit】Fix two crashes. YogaKitSample upgrade to swift 5 #1144
@@ -489,10 +489,8 @@ static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) {
|
|||||||
},
|
},
|
||||||
.size =
|
.size =
|
||||||
{
|
{
|
||||||
.width = YGRoundPixelValue(bottomRight.x) -
|
.width = MAX(0, YGRoundPixelValue(bottomRight.x) - YGRoundPixelValue(topLeft.x)),
|
||||||
YGRoundPixelValue(topLeft.x),
|
.height = MAX(0, YGRoundPixelValue(bottomRight.y) - YGRoundPixelValue(topLeft.y)),
|
||||||
.height = YGRoundPixelValue(bottomRight.y) -
|
|
||||||
YGRoundPixelValue(topLeft.y),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user