Summary: Fixes #606. If there are no subviews in `UIView`, yoga assumes that `sizeThatFits:` returns `CGSizeZero`. However, according to [the documentation](https://developer.apple.com/documentation/uikit/uiview/1622625-sizethatfits), `UIView` returns current size if there are no subviews. This diff adds a check - if there are no subviews, `sizeThatFits:` doesn't get called, and CGSizeZero is returned. Pull Request resolved: https://github.com/facebook/yoga/pull/610 Reviewed By: davidaurelio Differential Revision: D6807406 Pulled By: priteshrnandgaonkar fbshipit-source-id: 9189cf14c393f840122bc365d3827881bf03548c
YogaKit
Installation
YogaKit is available to install via CocoaPods.
pod 'YogaKit', '~> 1.7'
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.