Implemented percentage values in YogaKit

Summary:
We still need to wait for the `YGUnitPoint` PR to be merged :) But please let me know what you think. One caveat: because of a limitation of Swift, a literal value can be automatically understood as a point-based `YGValue`, but variables have to be explicitly cast. I haven't found a way around it yet:

```
view.yoga.width = 10 // value == 10, unit == YGUnitPixel

let a: CGFloat = 100
view.yoga.height = a // Compiler error
view.yoga.height = YGValue(a) // works, not great
```
Closes https://github.com/facebook/yoga/pull/390

Reviewed By: emilsjolander

Differential Revision: D4954021

Pulled By: maxoll

fbshipit-source-id: 5eff6aeb6dd969d0d5dc557b149bb5819b0e31de
This commit is contained in:
David Hart
2017-04-28 10:32:02 -07:00
committed by Facebook Github Bot
parent 203577724e
commit 7b89a1dd48
10 changed files with 322 additions and 221 deletions

View File

@@ -19,7 +19,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e
Yoga: 2ed1d7accfef3610a67f58c0cf101a0662137f2c
YogaKit: cddeccc6a8d2aff563e4c738d3bddb290a6de4cb
YogaKit: 6ffb39aec3ce792f1d14fb27cd98e7a73e85c71b
PODFILE CHECKSUM: 216f8e7127767709e0e43f3711208d238fa5c404