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
YogaKit
Installation
YogaKit is available to install via CocoaPods.
pod 'YogaKit', '~> 1.3'
Getting Started
Checkout the docs here.
We also have a sample project. To try it out, clone this repo and open YogaKitSample.xcodeproj
in the YogaKitSample directory.
Contributing
We welcome all pull-requests! At Facebook we sync the open source version of YogaKit
daily, so we're always testing the latest changes.
See the CONTRIBUTING.md file for how to help out.