Files
yoga/YogaKit/CHANGELOG.md
Dustin Shahidehpour 76fbd628e1 Use correct rounding function when rounding pixels.
Summary: While debugging something at Instagram, I kept seeing a UILabel be truncated when it clearly had enough room to display all its' text. What I realized is that during our pixel rounding, we were losing precision because we were using the incorrect rounding function for floats. Changing from `round()` (which is for doubles) to `roundf()` fixed it.

Reviewed By: amonshiz

Differential Revision: D4549069

fbshipit-source-id: 78a1bb33e315e7c066b7fb625b1f5a28def76515
2017-02-11 19:56:08 -08:00

519 B

CHANGELOG

The changelog for YogaKit.

1.2.0 (upcoming release)

Breaking Changes

  • applyLayout() has now been changed to applyLayout(preservingOrigin:).

  • Computed properties are no longer reflected in getter's of the affected properties.

// OLD
view.yoga.margin = 10
view.yoga.marginTop  // 10
view.yoga.marginLeft // 10

// NEW
view.yoga.margin = 10
view.yoga.marginTop // 0
view.yoga.marginLeft // 0

Enhancements

  • Pixel Rounding now uses roundf() instead of round().