Summary:
@public
Xcode does not like it
Reviewed By: astreet
Differential Revision: D14580168
fbshipit-source-id: 6d26b3961b45a59ef9dc977b21493e60e3cf9396
Summary: Turns out Xcode does not like document-level comments.
Reviewed By: SidharthGuglani
Differential Revision: D14301138
fbshipit-source-id: f515a1881daa109031963688c1556cb8ef42758f
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
Summary: Using the newer/recommended API in the sample project. #accept2ship
Reviewed By: emilsjolander
Differential Revision: D4698936
fbshipit-source-id: 07b61df897524cd38390ba48dfa2a2e10942329b
Summary:
To date, our sample project was lacking. There is still a lot of work that can be done to improve, but, this is a step in the right direction.
Here are the changes in this commit:
1. The project is written in Swift.
2. Created new CollectionView (via [IGListKit](https://github.com/instagram/iglistkit)), making it very easy to add new examples.
3. New examples for basic layouts, and including/excluding layouts on the fly.
Here's a video!

Closes https://github.com/facebook/yoga/pull/392
Reviewed By: emilsjolander
Differential Revision: D4550379
Pulled By: dshahidehpour
fbshipit-source-id: 64a07acf96c1887f1d2ad0c54971fcedb64334a0
Summary:
I incorrectly sized some assets, as a result, the sample project had some warnings about it when you built. This fixes it.
Closes https://github.com/facebook/yoga/pull/377
Differential Revision: D4515193
Pulled By: dshahidehpour
fbshipit-source-id: 3af6e79a17777bec3798bbf7294af5716f65e37a
Summary: The Sample app needed some love. It wouldn't build because of some import errors, adding files is very manual, and it looked bad. I have fixed all of these things.
Reviewed By: amonshiz
Differential Revision: D4508624
fbshipit-source-id: bda40defb167ef871d8d0d5bb853d8905b9682d8
Summary:
I'm trying to fix some bugs I introduced in my latest PR, but while writing the Unit Tests for them, I saw a really weird behaviour. The following exact piece of code WORKS inside a Yoga C++ unit test, but fails from a Objective-C unit test. I had me completely confused and blocked me in my progression. Any ideas?
```
TEST(YogaTest, stupid_test) {
const YGNodeRef node = YGNodeNew();
YGNodeStyleSetPosition(node, YGEdgeLeft, 1);
ASSERT_FLOAT_EQ(1, YGNodeStyleGetPosition(node, YGEdgeLeft).value);
ASSERT_EQ(YGUnitPixel, YGNodeStyleGetPosition(node, YGEdgeLeft).unit);
YGNodeFree(node);
}
```
```
- (void)testPositionalPropertiesWork
{
YGNodeRef node = YGNodeNew();
YGNodeStyleSetPosition(node, YGEdgeLeft, 1);
XCTAssertEqual(1, YGNodeStyleGetPosition(node, YGEdgeLeft).value);
XCTAssertEqual(YGUnitPixel, YGNodeStyleGetPosition(node, YGEdgeLeft).unit);
YGNodeFree(node);
}
```
Closes https://github.com/facebook/yoga/pull/328
Reviewed By: dshahidehpour
Differential Revision: D4421504
Pulled By: emilsjolander
fbshipit-source-id: f59379edf70aee87a77cd1ad2986313cdfe71b94
Summary:
Compared to what was planned, I added the `overflow` value which seemed missing. I had to modify the implementation a bit for all values which are backed by a `YGValue`, but we should probably enable the pixel dimensions in Objective-C and Swift somehow later.
Closes https://github.com/facebook/yoga/pull/322
Reviewed By: cosmin1123
Differential Revision: D4391434
Pulled By: emilsjolander
fbshipit-source-id: e33f6f7b2bbaad29553100b7a5bb424496372110
Summary:
Compared to what was planned, I added the `overflow` value which seemed missing. I had to modify the implementation a bit for all values which are backed by a `YGValue`, but we should probably enable the pixel dimensions in Objective-C and Swift somehow later.
Closes https://github.com/facebook/yoga/pull/322
Reviewed By: dshahidehpour
Differential Revision: D4386906
Pulled By: emilsjolander
fbshipit-source-id: 05ac0e571ef3a8ff0be31469e449a7b23f102218