From 7097b12b921bb7bcfb738175baeee02db7a2b06a Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 12 Jul 2023 12:19:27 -0700 Subject: [PATCH] Remove YogaKit Summary: We deprecated this as part of the Yoga 2.0 release. The last version is still present as part of the release-v2.0 branch, and was still published, but we are not carrying the code forward. This removes it. Reviewed By: mdvacca Differential Revision: D47136781 fbshipit-source-id: ac60939efb2372db04e33ed26456bad2f3b5852b --- .../workflows/publish-cocoapods-release.yml | 6 - .github/workflows/validate-apple.yml | 33 - README.md | 2 +- YogaKit.podspec | 34 - YogaKit/README.md | 21 - YogaKit/Source/UIView+Yoga.h | 37 - YogaKit/Source/UIView+Yoga.m | 37 - YogaKit/Source/YGLayout+Private.h | 17 - YogaKit/Source/YGLayout.h | 174 ---- YogaKit/Source/YGLayout.m | 511 ------------ YogaKit/Source/YGLayoutExtensions.swift | 45 -- YogaKit/Tests/Info.plist | 22 - YogaKit/Tests/YogaKitTests.m | 753 ------------------ YogaKit/YogaKitSample/Podfile | 17 - YogaKit/YogaKitSample/Podfile.lock | 33 - .../YogaKitSample.xcodeproj/project.pbxproj | 518 ------------ .../contents.xcworkspacedata | 7 - .../xcschemes/YogaKitSample.xcscheme | 101 --- .../contents.xcworkspacedata | 10 - .../YogaKitSample/AppDelegate.swift | 26 - .../AppIcon.appiconset/Contents.json | 74 -- .../AppIcon.appiconset/Yoga-20x20@2x.png | Bin 1198 -> 0 bytes .../AppIcon.appiconset/Yoga-20x20@3x.png | Bin 1927 -> 0 bytes .../AppIcon.appiconset/Yoga-29x29@1x.png | Bin 868 -> 0 bytes .../AppIcon.appiconset/Yoga-29x29@2x.png | Bin 1917 -> 0 bytes .../AppIcon.appiconset/Yoga-29x29@3x.png | Bin 3086 -> 0 bytes .../AppIcon.appiconset/Yoga-40x40@2x.png | Bin 2777 -> 0 bytes .../AppIcon.appiconset/Yoga-40x40@3x.png | Bin 4616 -> 0 bytes .../AppIcon.appiconset/Yoga-57x57@1x.png | Bin 3546 -> 0 bytes .../AppIcon.appiconset/Yoga-57x57@2x.png | Bin 8676 -> 0 bytes .../AppIcon.appiconset/Yoga-60x60@2x.png | Bin 4616 -> 0 bytes .../AppIcon.appiconset/Yoga-60x60@3x.png | Bin 7550 -> 0 bytes .../Assets.xcassets/Contents.json | 6 - .../ExamplesViewController.swift | 102 --- .../YogaKitSample/YogaKitSample/Info.plist | 36 - .../YogaKitSample/SwiftViewController.swift | 70 -- .../YogaKitSample/ViewController.m | 51 -- .../ViewControllers/BasicViewController.swift | 58 -- .../LayoutInclusionViewController.swift | 80 -- .../Views/SingleLabelCollectionCell.swift | 48 -- set-version.py | 13 +- .../contributing/opening-a-pull-request.md | 3 - 42 files changed, 7 insertions(+), 2938 deletions(-) delete mode 100644 YogaKit.podspec delete mode 100644 YogaKit/README.md delete mode 100644 YogaKit/Source/UIView+Yoga.h delete mode 100644 YogaKit/Source/UIView+Yoga.m delete mode 100644 YogaKit/Source/YGLayout+Private.h delete mode 100644 YogaKit/Source/YGLayout.h delete mode 100644 YogaKit/Source/YGLayout.m delete mode 100644 YogaKit/Source/YGLayoutExtensions.swift delete mode 100644 YogaKit/Tests/Info.plist delete mode 100644 YogaKit/Tests/YogaKitTests.m delete mode 100644 YogaKit/YogaKitSample/Podfile delete mode 100644 YogaKit/YogaKitSample/Podfile.lock delete mode 100644 YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj delete mode 100644 YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcshareddata/xcschemes/YogaKitSample.xcscheme delete mode 100644 YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@2x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@3x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@1x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@2x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@3x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-40x40@2x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-40x40@3x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-57x57@1x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-57x57@2x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-60x60@2x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-60x60@3x.png delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/Contents.json delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/ExamplesViewController.swift delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Info.plist delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/SwiftViewController.swift delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/ViewController.m delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/ViewControllers/BasicViewController.swift delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/ViewControllers/LayoutInclusionViewController.swift delete mode 100644 YogaKit/YogaKitSample/YogaKitSample/Views/SingleLabelCollectionCell.swift diff --git a/.github/workflows/publish-cocoapods-release.yml b/.github/workflows/publish-cocoapods-release.yml index 8f314852..411702d6 100644 --- a/.github/workflows/publish-cocoapods-release.yml +++ b/.github/workflows/publish-cocoapods-release.yml @@ -21,9 +21,3 @@ jobs: run: pod trunk push Yoga.podspec env: COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - - - name: Publish YogaKit - # Must run with --synchronous since YogaKit may depend on the just published version of Yoga - run: pod trunk push YogaKit.podspec --synchronous - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/.github/workflows/validate-apple.yml b/.github/workflows/validate-apple.yml index 92c891d7..1b2dcd13 100644 --- a/.github/workflows/validate-apple.yml +++ b/.github/workflows/validate-apple.yml @@ -20,36 +20,3 @@ jobs: - name: pod lib lint run: pod lib lint --verbose --include-podspecs=**/*.podspec - - build-sample: - name: Build sample [${{ matrix.mode }}] - runs-on: macos-latest - strategy: - matrix: - mode: [Debug, Release] - - steps: - - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup-apple - - - name: pod install - run: pod install - working-directory: ./YogaKit/YogaKitSample - - - name: xcodebuild YogaKitSample.xcworkspace - run: xcodebuild -workspace YogaKitSample.xcworkspace -scheme YogaKitSample - working-directory: ./YogaKit/YogaKitSample - - clang-format: - name: Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: clang-format - uses: ./.github/actions/clang-format - with: - directory: ./YogaKit diff --git a/README.md b/README.md index b05611c2..3fc4aeee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Yoga [![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine) [![CocoaPods](https://img.shields.io/cocoapods/v/YogaKit.svg)](http://cocoapods.org/pods/YogaKit) [![npm](https://img.shields.io/npm/v/yoga-layout.svg)](https://www.npmjs.com/package/yoga-layout) [![Maven Central](https://img.shields.io/maven-central/v/com.facebook.yoga/yoga)](https://search.maven.org/artifact/com.facebook.yoga/yoga) +# Yoga [![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine) [![CocoaPods](https://img.shields.io/cocoapods/v/Yoga.svg)](http://cocoapods.org/pods/Yoga) [![npm](https://img.shields.io/npm/v/yoga-layout.svg)](https://www.npmjs.com/package/yoga-layout) [![Maven Central](https://img.shields.io/maven-central/v/com.facebook.yoga/yoga)](https://search.maven.org/artifact/com.facebook.yoga/yoga) Yoga is an embeddable and performant flexbox layout engine with bindings for multiple languages. diff --git a/YogaKit.podspec b/YogaKit.podspec deleted file mode 100644 index bd03bd42..00000000 --- a/YogaKit.podspec +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -podspec = Pod::Spec.new do |spec| - spec.name = 'YogaKit' - spec.version = '2.0.0' - spec.license = { :type => 'MIT', :file => "LICENSE" } - spec.homepage = 'https://yogalayout.com/' - spec.documentation_url = 'https://yogalayout.com/docs' - spec.deprecated = true - - spec.summary = 'YogaKit allows using the Yoga layout engine in combination with UIKit' - - spec.authors = {'Meta Open Source' => 'opensource@meta.com'} - spec.source = { - :git => 'https://github.com/facebook/yoga.git', - :tag => "v#{spec.version.to_s}", - } - - spec.platforms = { :ios => "13.4" } - spec.ios.frameworks = 'UIKit' - spec.module_name = 'YogaKit' - spec.dependency 'Yoga', "~> #{spec.version.to_s}" - spec.source_files = 'YogaKit/Source/*.{h,m,swift}' - spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h' - spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h' - spec.swift_version = '5.1' -end - -# See https://github.com/facebook/yoga/pull/366 -podspec.attributes_hash["readme"] = "YogaKit/README.md" -podspec diff --git a/YogaKit/README.md b/YogaKit/README.md deleted file mode 100644 index a5d70543..00000000 --- a/YogaKit/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# YogaKit - -[![CocoaPods](https://img.shields.io/cocoapods/v/YogaKit.svg?style=flat)](https://cocoapods.org/pods/YogaKit) -[![Platform](https://img.shields.io/badge/platforms-iOS-orange.svg)](https://facebook.github.io/yoga/docs/api/yogakit/) -[![Languages](https://img.shields.io/badge/languages-ObjC%20%7C%20Swift-orange.svg)](https://facebook.github.io/yoga/docs/api/yogakit/) - -## Installation -YogaKit is available to install via [CocoaPods](https://cocoapods.org/). - -``` -pod 'YogaKit', '~> 1.7' -``` - -## Getting Started - -We have a sample project. To try it out, clone this repo and open `YogaKitSample.xcodeproj` in the [YogaKitSample](https://github.com/facebook/yoga/tree/main/YogaKit/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](https://github.com/facebook/yoga/blob/main/CONTRIBUTING.md) file for how to help out. diff --git a/YogaKit/Source/UIView+Yoga.h b/YogaKit/Source/UIView+Yoga.h deleted file mode 100644 index 63168519..00000000 --- a/YogaKit/Source/UIView+Yoga.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import "YGLayout.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void (^YGLayoutConfigurationBlock)(YGLayout* layout); - -@interface UIView (Yoga) - -/** - The YGLayout that is attached to this view. It is lazily created. - */ -@property(nonatomic, readonly, strong) YGLayout* yoga; -/** - Indicates whether or not Yoga is enabled - */ -@property(nonatomic, readonly, assign) BOOL isYogaEnabled; - -/** - In ObjC land, every time you access `view.yoga.*` you are adding another - `objc_msgSend` to your code. If you plan on making multiple changes to - YGLayout, it's more performant to use this method, which uses a single - objc_msgSend call. - */ -- (void)configureLayoutWithBlock:(YGLayoutConfigurationBlock)block - NS_SWIFT_NAME(configureLayout(block:)); - -@end - -NS_ASSUME_NONNULL_END diff --git a/YogaKit/Source/UIView+Yoga.m b/YogaKit/Source/UIView+Yoga.m deleted file mode 100644 index d64b387a..00000000 --- a/YogaKit/Source/UIView+Yoga.m +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import "UIView+Yoga.h" -#import "YGLayout+Private.h" - -static const void* kYGYogaAssociatedKey = &kYGYogaAssociatedKey; - -@implementation UIView (YogaKit) - -- (YGLayout*)yoga { - YGLayout* yoga = objc_getAssociatedObject(self, kYGYogaAssociatedKey); - if (!yoga) { - yoga = [[YGLayout alloc] initWithView:self]; - objc_setAssociatedObject( - self, kYGYogaAssociatedKey, yoga, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } - - return yoga; -} - -- (BOOL)isYogaEnabled { - return objc_getAssociatedObject(self, kYGYogaAssociatedKey) != nil; -} - -- (void)configureLayoutWithBlock:(YGLayoutConfigurationBlock)block { - if (block != nil) { - block(self.yoga); - } -} - -@end diff --git a/YogaKit/Source/YGLayout+Private.h b/YogaKit/Source/YGLayout+Private.h deleted file mode 100644 index 63fd8c79..00000000 --- a/YogaKit/Source/YGLayout+Private.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import "YGLayout.h" - -@interface YGLayout () - -@property(nonatomic, assign, readonly) YGNodeRef node; - -- (instancetype)initWithView:(UIView*)view; - -@end diff --git a/YogaKit/Source/YGLayout.h b/YogaKit/Source/YGLayout.h deleted file mode 100644 index 20751406..00000000 --- a/YogaKit/Source/YGLayout.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import -#import -#import -#import - -YG_EXTERN_C_BEGIN - -extern YGValue YGPointValue(CGFloat value) NS_SWIFT_UNAVAILABLE( - "Use the swift Int and FloatingPoint extensions instead"); -extern YGValue YGPercentValue(CGFloat value) NS_SWIFT_UNAVAILABLE( - "Use the swift Int and FloatingPoint extensions instead"); - -YG_EXTERN_C_END - -typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) { - YGDimensionFlexibilityFlexibleWidth = 1 << 0, - YGDimensionFlexibilityFlexibleHeight = 1 << 1, -}; - -@interface YGLayout : NSObject - -/** - Make default init unavailable, as it will not initialise YGNode which is - required for the setters and getters of YGLayout's properties to work properly. -*/ -- (instancetype)init - __attribute__((unavailable("you are not meant to initialise YGLayout"))); - -/** - Make default init unavailable, as it will not initialise YGNode which is - required for the setters and getters of YGLayout's properties to work properly. - */ -+ (instancetype)new - __attribute__((unavailable("you are not meant to initialise YGLayout"))); - -/** - The property that decides if we should include this view when calculating - layout. Defaults to YES. - */ -@property(nonatomic, readwrite, assign, setter=setIncludedInLayout:) - BOOL isIncludedInLayout; - -/** - The property that decides during layout/sizing whether or not styling - properties should be applied. Defaults to NO. - */ -@property(nonatomic, readwrite, assign, setter=setEnabled:) BOOL isEnabled; - -@property(nonatomic, readwrite, assign) YGDirection direction; -@property(nonatomic, readwrite, assign) YGFlexDirection flexDirection; -@property(nonatomic, readwrite, assign) YGJustify justifyContent; -@property(nonatomic, readwrite, assign) YGAlign alignContent; -@property(nonatomic, readwrite, assign) YGAlign alignItems; -@property(nonatomic, readwrite, assign) YGAlign alignSelf; -@property(nonatomic, readwrite, assign) YGPositionType position; -@property(nonatomic, readwrite, assign) YGWrap flexWrap; -@property(nonatomic, readwrite, assign) YGOverflow overflow; -@property(nonatomic, readwrite, assign) YGDisplay display; - -@property(nonatomic, readwrite, assign) CGFloat flex; -@property(nonatomic, readwrite, assign) CGFloat flexGrow; -@property(nonatomic, readwrite, assign) CGFloat flexShrink; -@property(nonatomic, readwrite, assign) YGValue flexBasis; - -@property(nonatomic, readwrite, assign) YGValue left; -@property(nonatomic, readwrite, assign) YGValue top; -@property(nonatomic, readwrite, assign) YGValue right; -@property(nonatomic, readwrite, assign) YGValue bottom; -@property(nonatomic, readwrite, assign) YGValue start; -@property(nonatomic, readwrite, assign) YGValue end; - -@property(nonatomic, readwrite, assign) YGValue marginLeft; -@property(nonatomic, readwrite, assign) YGValue marginTop; -@property(nonatomic, readwrite, assign) YGValue marginRight; -@property(nonatomic, readwrite, assign) YGValue marginBottom; -@property(nonatomic, readwrite, assign) YGValue marginStart; -@property(nonatomic, readwrite, assign) YGValue marginEnd; -@property(nonatomic, readwrite, assign) YGValue marginHorizontal; -@property(nonatomic, readwrite, assign) YGValue marginVertical; -@property(nonatomic, readwrite, assign) YGValue margin; - -@property(nonatomic, readwrite, assign) YGValue paddingLeft; -@property(nonatomic, readwrite, assign) YGValue paddingTop; -@property(nonatomic, readwrite, assign) YGValue paddingRight; -@property(nonatomic, readwrite, assign) YGValue paddingBottom; -@property(nonatomic, readwrite, assign) YGValue paddingStart; -@property(nonatomic, readwrite, assign) YGValue paddingEnd; -@property(nonatomic, readwrite, assign) YGValue paddingHorizontal; -@property(nonatomic, readwrite, assign) YGValue paddingVertical; -@property(nonatomic, readwrite, assign) YGValue padding; - -@property(nonatomic, readwrite, assign) CGFloat borderLeftWidth; -@property(nonatomic, readwrite, assign) CGFloat borderTopWidth; -@property(nonatomic, readwrite, assign) CGFloat borderRightWidth; -@property(nonatomic, readwrite, assign) CGFloat borderBottomWidth; -@property(nonatomic, readwrite, assign) CGFloat borderStartWidth; -@property(nonatomic, readwrite, assign) CGFloat borderEndWidth; -@property(nonatomic, readwrite, assign) CGFloat borderWidth; - -@property(nonatomic, readwrite, assign) YGValue width; -@property(nonatomic, readwrite, assign) YGValue height; -@property(nonatomic, readwrite, assign) YGValue minWidth; -@property(nonatomic, readwrite, assign) YGValue minHeight; -@property(nonatomic, readwrite, assign) YGValue maxWidth; -@property(nonatomic, readwrite, assign) YGValue maxHeight; - -// Yoga specific properties, not compatible with flexbox specification -@property(nonatomic, readwrite, assign) CGFloat aspectRatio; - -/** - Get the resolved direction of this node. This won't be YGDirectionInherit - */ -@property(nonatomic, readonly, assign) YGDirection resolvedDirection; - -/** - Perform a layout calculation and update the frames of the views in the - hierarchy with the results. If the origin is not preserved, the root view's - layout results will applied from {0,0}. - */ -- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin - NS_SWIFT_NAME(applyLayout(preservingOrigin:)); - -/** - Perform a layout calculation and update the frames of the views in the - hierarchy with the results. If the origin is not preserved, the root view's - layout results will applied from {0,0}. - */ -- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin - dimensionFlexibility:(YGDimensionFlexibility)dimensionFlexibility - NS_SWIFT_NAME(applyLayout(preservingOrigin:dimensionFlexibility:)); - -/** - Returns the size of the view if no constraints were given. This could - equivalent to calling [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; - */ -@property(nonatomic, readonly, assign) CGSize intrinsicSize; - -/** - Returns the size of the view based on provided constraints. Pass NaN for an - unconstrained dimension. - */ -- (CGSize)calculateLayoutWithSize:(CGSize)size - NS_SWIFT_NAME(calculateLayout(with:)); - -/** - Returns the number of children that are using Flexbox. - */ -@property(nonatomic, readonly, assign) NSUInteger numberOfChildren; - -/** - Return a BOOL indiciating whether or not we this node contains any subviews - that are included in Yoga's layout. - */ -@property(nonatomic, readonly, assign) BOOL isLeaf; - -/** - Return's a BOOL indicating if a view is dirty. When a node is dirty - it usually indicates that it will be remeasured on the next layout pass. - */ -@property(nonatomic, readonly, assign) BOOL isDirty; - -/** - Mark that a view's layout needs to be recalculated. Only works for leaf views. - */ -- (void)markDirty; - -@end diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m deleted file mode 100644 index 638a81da..00000000 --- a/YogaKit/Source/YGLayout.m +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "UIView+Yoga.h" -#import "YGLayout+Private.h" - -#define YG_PROPERTY(type, lowercased_name, capitalized_name) \ - -(type)lowercased_name { \ - return YGNodeStyleGet##capitalized_name(self.node); \ - } \ - \ - -(void)set##capitalized_name : (type)lowercased_name { \ - YGNodeStyleSet##capitalized_name(self.node, lowercased_name); \ - } - -#define YG_VALUE_PROPERTY(lowercased_name, capitalized_name) \ - -(YGValue)lowercased_name { \ - return YGNodeStyleGet##capitalized_name(self.node); \ - } \ - \ - -(void)set##capitalized_name : (YGValue)lowercased_name { \ - switch (lowercased_name.unit) { \ - case YGUnitUndefined: \ - YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \ - break; \ - case YGUnitPoint: \ - YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \ - break; \ - case YGUnitPercent: \ - YGNodeStyleSet##capitalized_name##Percent( \ - self.node, lowercased_name.value); \ - break; \ - default: \ - NSAssert(NO, @"Not implemented"); \ - } \ - } - -#define YG_AUTO_VALUE_PROPERTY(lowercased_name, capitalized_name) \ - -(YGValue)lowercased_name { \ - return YGNodeStyleGet##capitalized_name(self.node); \ - } \ - \ - -(void)set##capitalized_name : (YGValue)lowercased_name { \ - switch (lowercased_name.unit) { \ - case YGUnitPoint: \ - YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \ - break; \ - case YGUnitPercent: \ - YGNodeStyleSet##capitalized_name##Percent( \ - self.node, lowercased_name.value); \ - break; \ - case YGUnitAuto: \ - YGNodeStyleSet##capitalized_name##Auto(self.node); \ - break; \ - default: \ - NSAssert(NO, @"Not implemented"); \ - } \ - } - -#define YG_EDGE_PROPERTY_GETTER( \ - type, lowercased_name, capitalized_name, property, edge) \ - -(type)lowercased_name { \ - return YGNodeStyleGet##property(self.node, edge); \ - } - -#define YG_EDGE_PROPERTY_SETTER( \ - lowercased_name, capitalized_name, property, edge) \ - -(void)set##capitalized_name : (CGFloat)lowercased_name { \ - YGNodeStyleSet##property(self.node, edge, lowercased_name); \ - } - -#define YG_EDGE_PROPERTY(lowercased_name, capitalized_name, property, edge) \ - YG_EDGE_PROPERTY_GETTER( \ - CGFloat, lowercased_name, capitalized_name, property, edge) \ - YG_EDGE_PROPERTY_SETTER(lowercased_name, capitalized_name, property, edge) - -#define YG_VALUE_EDGE_PROPERTY_SETTER( \ - objc_lowercased_name, objc_capitalized_name, c_name, edge) \ - -(void)set##objc_capitalized_name : (YGValue)objc_lowercased_name { \ - switch (objc_lowercased_name.unit) { \ - case YGUnitUndefined: \ - YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \ - break; \ - case YGUnitPoint: \ - YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \ - break; \ - case YGUnitPercent: \ - YGNodeStyleSet##c_name##Percent( \ - self.node, edge, objc_lowercased_name.value); \ - break; \ - default: \ - NSAssert(NO, @"Not implemented"); \ - } \ - } - -#define YG_VALUE_EDGE_PROPERTY( \ - lowercased_name, capitalized_name, property, edge) \ - YG_EDGE_PROPERTY_GETTER( \ - YGValue, lowercased_name, capitalized_name, property, edge) \ - YG_VALUE_EDGE_PROPERTY_SETTER( \ - lowercased_name, capitalized_name, property, edge) - -#define YG_VALUE_EDGES_PROPERTIES(lowercased_name, capitalized_name) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Left, \ - capitalized_name##Left, \ - capitalized_name, \ - YGEdgeLeft) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Top, \ - capitalized_name##Top, \ - capitalized_name, \ - YGEdgeTop) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Right, \ - capitalized_name##Right, \ - capitalized_name, \ - YGEdgeRight) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Bottom, \ - capitalized_name##Bottom, \ - capitalized_name, \ - YGEdgeBottom) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Start, \ - capitalized_name##Start, \ - capitalized_name, \ - YGEdgeStart) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##End, \ - capitalized_name##End, \ - capitalized_name, \ - YGEdgeEnd) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Horizontal, \ - capitalized_name##Horizontal, \ - capitalized_name, \ - YGEdgeHorizontal) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name##Vertical, \ - capitalized_name##Vertical, \ - capitalized_name, \ - YGEdgeVertical) \ - YG_VALUE_EDGE_PROPERTY( \ - lowercased_name, capitalized_name, capitalized_name, YGEdgeAll) - -YGValue YGPointValue(CGFloat value) { - return (YGValue){.value = value, .unit = YGUnitPoint}; -} - -YGValue YGPercentValue(CGFloat value) { - return (YGValue){.value = value, .unit = YGUnitPercent}; -} - -static YGConfigRef globalConfig; - -@interface YGLayout () - -@property(nonatomic, weak, readonly) UIView* view; -@property(nonatomic, assign, readonly) BOOL isUIView; - -@end - -@implementation YGLayout - -@synthesize isEnabled = _isEnabled; -@synthesize isIncludedInLayout = _isIncludedInLayout; -@synthesize node = _node; - -+ (void)initialize { - globalConfig = YGConfigNew(); - YGConfigSetExperimentalFeatureEnabled( - globalConfig, YGExperimentalFeatureWebFlexBasis, true); - YGConfigSetErrata(globalConfig, YGErrataClassic); - YGConfigSetPointScaleFactor(globalConfig, [UIScreen mainScreen].scale); -} - -- (instancetype)initWithView:(UIView*)view { - if (self = [super init]) { - _view = view; - _node = YGNodeNewWithConfig(globalConfig); - YGNodeSetContext(_node, (__bridge void*)view); - _isEnabled = NO; - _isIncludedInLayout = YES; - _isUIView = [view isMemberOfClass:[UIView class]]; - } - - return self; -} - -- (void)dealloc { - YGNodeFree(self.node); -} - -- (BOOL)isDirty { - return YGNodeIsDirty(self.node); -} - -- (void)markDirty { - if (self.isDirty || !self.isLeaf) { - return; - } - - // Yoga is not happy if we try to mark a node as "dirty" before we have set - // the measure function. Since we already know that this is a leaf, - // this *should* be fine. Forgive me Hack Gods. - const YGNodeRef node = self.node; - if (!YGNodeHasMeasureFunc(node)) { - YGNodeSetMeasureFunc(node, YGMeasureView); - } - - YGNodeMarkDirty(node); -} - -- (NSUInteger)numberOfChildren { - return YGNodeGetChildCount(self.node); -} - -- (BOOL)isLeaf { - NSAssert( - [NSThread isMainThread], - @"This method must be called on the main thread."); - if (self.isEnabled) { - for (UIView* subview in self.view.subviews) { - YGLayout* const yoga = subview.yoga; - if (yoga.isEnabled && yoga.isIncludedInLayout) { - return NO; - } - } - } - - return YES; -} - -#pragma mark - Style - -- (YGPositionType)position { - return YGNodeStyleGetPositionType(self.node); -} - -- (void)setPosition:(YGPositionType)position { - YGNodeStyleSetPositionType(self.node, position); -} - -YG_PROPERTY(YGDirection, direction, Direction) -YG_PROPERTY(YGFlexDirection, flexDirection, FlexDirection) -YG_PROPERTY(YGJustify, justifyContent, JustifyContent) -YG_PROPERTY(YGAlign, alignContent, AlignContent) -YG_PROPERTY(YGAlign, alignItems, AlignItems) -YG_PROPERTY(YGAlign, alignSelf, AlignSelf) -YG_PROPERTY(YGWrap, flexWrap, FlexWrap) -YG_PROPERTY(YGOverflow, overflow, Overflow) -YG_PROPERTY(YGDisplay, display, Display) - -YG_PROPERTY(CGFloat, flex, Flex) -YG_PROPERTY(CGFloat, flexGrow, FlexGrow) -YG_PROPERTY(CGFloat, flexShrink, FlexShrink) -YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis) - -YG_VALUE_EDGE_PROPERTY(left, Left, Position, YGEdgeLeft) -YG_VALUE_EDGE_PROPERTY(top, Top, Position, YGEdgeTop) -YG_VALUE_EDGE_PROPERTY(right, Right, Position, YGEdgeRight) -YG_VALUE_EDGE_PROPERTY(bottom, Bottom, Position, YGEdgeBottom) -YG_VALUE_EDGE_PROPERTY(start, Start, Position, YGEdgeStart) -YG_VALUE_EDGE_PROPERTY(end, End, Position, YGEdgeEnd) -YG_VALUE_EDGES_PROPERTIES(margin, Margin) -YG_VALUE_EDGES_PROPERTIES(padding, Padding) - -YG_EDGE_PROPERTY(borderLeftWidth, BorderLeftWidth, Border, YGEdgeLeft) -YG_EDGE_PROPERTY(borderTopWidth, BorderTopWidth, Border, YGEdgeTop) -YG_EDGE_PROPERTY(borderRightWidth, BorderRightWidth, Border, YGEdgeRight) -YG_EDGE_PROPERTY(borderBottomWidth, BorderBottomWidth, Border, YGEdgeBottom) -YG_EDGE_PROPERTY(borderStartWidth, BorderStartWidth, Border, YGEdgeStart) -YG_EDGE_PROPERTY(borderEndWidth, BorderEndWidth, Border, YGEdgeEnd) -YG_EDGE_PROPERTY(borderWidth, BorderWidth, Border, YGEdgeAll) - -YG_AUTO_VALUE_PROPERTY(width, Width) -YG_AUTO_VALUE_PROPERTY(height, Height) -YG_VALUE_PROPERTY(minWidth, MinWidth) -YG_VALUE_PROPERTY(minHeight, MinHeight) -YG_VALUE_PROPERTY(maxWidth, MaxWidth) -YG_VALUE_PROPERTY(maxHeight, MaxHeight) -YG_PROPERTY(CGFloat, aspectRatio, AspectRatio) - -YG_EDGE_PROPERTY(columnGap, ColumnGap, Gap, YGGutterColumn) -YG_EDGE_PROPERTY(rowGap, RowGap, Gap, YGGutterRow) -YG_EDGE_PROPERTY(gap, Gap, Gap, YGGutterAll) - -#pragma mark - Layout and Sizing - -- (YGDirection)resolvedDirection { - return YGNodeLayoutGetDirection(self.node); -} - -- (void)applyLayout { - [self calculateLayoutWithSize:self.view.bounds.size]; - YGApplyLayoutToViewHierarchy(self.view, NO); -} - -- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin { - [self calculateLayoutWithSize:self.view.bounds.size]; - YGApplyLayoutToViewHierarchy(self.view, preserveOrigin); -} - -- (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin - dimensionFlexibility: - (YGDimensionFlexibility)dimensionFlexibility { - CGSize size = self.view.bounds.size; - if (dimensionFlexibility & YGDimensionFlexibilityFlexibleWidth) { - size.width = YGUndefined; - } - if (dimensionFlexibility & YGDimensionFlexibilityFlexibleHeight) { - size.height = YGUndefined; - } - [self calculateLayoutWithSize:size]; - YGApplyLayoutToViewHierarchy(self.view, preserveOrigin); -} - -- (CGSize)intrinsicSize { - const CGSize constrainedSize = { - .width = YGUndefined, - .height = YGUndefined, - }; - return [self calculateLayoutWithSize:constrainedSize]; -} - -- (CGSize)calculateLayoutWithSize:(CGSize)size { - NSAssert([NSThread isMainThread], @"Yoga calculation must be done on main."); - NSAssert(self.isEnabled, @"Yoga is not enabled for this view."); - - YGAttachNodesFromViewHierachy(self.view); - - const YGNodeRef node = self.node; - YGNodeCalculateLayout( - node, size.width, size.height, YGNodeStyleGetDirection(node)); - - return (CGSize){ - .width = YGNodeLayoutGetWidth(node), - .height = YGNodeLayoutGetHeight(node), - }; -} - -#pragma mark - Private - -static YGSize YGMeasureView( - YGNodeRef node, - float width, - YGMeasureMode widthMode, - float height, - YGMeasureMode heightMode) { - const CGFloat constrainedWidth = - (widthMode == YGMeasureModeUndefined) ? CGFLOAT_MAX : width; - const CGFloat constrainedHeight = - (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX : height; - - UIView* view = (__bridge UIView*)YGNodeGetContext(node); - CGSize sizeThatFits = CGSizeZero; - - // The default implementation of sizeThatFits: returns the existing size of - // the view. That means that if we want to layout an empty UIView, which - // already has got a frame set, its measured size should be CGSizeZero, but - // UIKit returns the existing size. - // - // See https://github.com/facebook/yoga/issues/606 for more information. - if (!view.yoga.isUIView || [view.subviews count] > 0) { - sizeThatFits = [view sizeThatFits:(CGSize){ - .width = constrainedWidth, - .height = constrainedHeight, - }]; - } - - return (YGSize){ - .width = YGSanitizeMeasurement( - constrainedWidth, sizeThatFits.width, widthMode), - .height = YGSanitizeMeasurement( - constrainedHeight, sizeThatFits.height, heightMode), - }; -} - -static CGFloat YGSanitizeMeasurement( - CGFloat constrainedSize, - CGFloat measuredSize, - YGMeasureMode measureMode) { - CGFloat result; - if (measureMode == YGMeasureModeExactly) { - result = constrainedSize; - } else if (measureMode == YGMeasureModeAtMost) { - result = MIN(constrainedSize, measuredSize); - } else { - result = measuredSize; - } - - return result; -} - -static BOOL YGNodeHasExactSameChildren( - const YGNodeRef node, - NSArray* subviews) { - if (YGNodeGetChildCount(node) != subviews.count) { - return NO; - } - - for (int i = 0; i < subviews.count; i++) { - if (YGNodeGetChild(node, i) != subviews[i].yoga.node) { - return NO; - } - } - - return YES; -} - -static void YGAttachNodesFromViewHierachy(UIView* const view) { - YGLayout* const yoga = view.yoga; - const YGNodeRef node = yoga.node; - - // Only leaf nodes should have a measure function - if (yoga.isLeaf) { - YGRemoveAllChildren(node); - YGNodeSetMeasureFunc(node, YGMeasureView); - } else { - YGNodeSetMeasureFunc(node, NULL); - - NSMutableArray* subviewsToInclude = - [[NSMutableArray alloc] initWithCapacity:view.subviews.count]; - for (UIView* subview in view.subviews) { - if (subview.yoga.isEnabled && subview.yoga.isIncludedInLayout) { - [subviewsToInclude addObject:subview]; - } - } - - if (!YGNodeHasExactSameChildren(node, subviewsToInclude)) { - YGRemoveAllChildren(node); - for (int i = 0; i < subviewsToInclude.count; i++) { - YGNodeInsertChild(node, subviewsToInclude[i].yoga.node, i); - } - } - - for (UIView* const subview in subviewsToInclude) { - YGAttachNodesFromViewHierachy(subview); - } - } -} - -static void YGRemoveAllChildren(const YGNodeRef node) { - if (node == NULL) { - return; - } - - YGNodeRemoveAllChildren(node); -} - -static CGFloat YGRoundPixelValue(CGFloat value) { - static CGFloat scale; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^() { - scale = [UIScreen mainScreen].scale; - }); - - return roundf(value * scale) / scale; -} - -static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) { - NSCAssert( - [NSThread isMainThread], - @"Framesetting should only be done on the main thread."); - - const YGLayout* yoga = view.yoga; - - if (!yoga.isIncludedInLayout) { - return; - } - - YGNodeRef node = yoga.node; - const CGPoint topLeft = { - YGNodeLayoutGetLeft(node), - YGNodeLayoutGetTop(node), - }; - - const CGPoint bottomRight = { - topLeft.x + YGNodeLayoutGetWidth(node), - topLeft.y + YGNodeLayoutGetHeight(node), - }; - - const CGPoint origin = preserveOrigin ? view.frame.origin : CGPointZero; - view.frame = (CGRect){ - .origin = - { - .x = YGRoundPixelValue(topLeft.x + origin.x), - .y = YGRoundPixelValue(topLeft.y + origin.y), - }, - .size = - { - .width = YGRoundPixelValue(bottomRight.x) - - YGRoundPixelValue(topLeft.x), - .height = YGRoundPixelValue(bottomRight.y) - - YGRoundPixelValue(topLeft.y), - }, - }; - - if (!yoga.isLeaf) { - for (NSUInteger i = 0; i < view.subviews.count; i++) { - YGApplyLayoutToViewHierarchy(view.subviews[i], NO); - } - } -} - -@end diff --git a/YogaKit/Source/YGLayoutExtensions.swift b/YogaKit/Source/YGLayoutExtensions.swift deleted file mode 100644 index 8962ba33..00000000 --- a/YogaKit/Source/YGLayoutExtensions.swift +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import yoga; -postfix operator % - -extension Int { - public static postfix func %(value: Int) -> YGValue { - return YGValue(value: Float(value), unit: .percent) - } -} - -extension Float { - public static postfix func %(value: Float) -> YGValue { - return YGValue(value: value, unit: .percent) - } -} - -extension CGFloat { - public static postfix func %(value: CGFloat) -> YGValue { - return YGValue(value: Float(value), unit: .percent) - } -} - -extension YGValue : ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral { - public init(integerLiteral value: Int) { - self = YGValue(value: Float(value), unit: .point) - } - - public init(floatLiteral value: Float) { - self = YGValue(value: value, unit: .point) - } - - public init(_ value: Float) { - self = YGValue(value: value, unit: .point) - } - - public init(_ value: CGFloat) { - self = YGValue(value: Float(value), unit: .point) - } -} diff --git a/YogaKit/Tests/Info.plist b/YogaKit/Tests/Info.plist deleted file mode 100644 index c317ef52..00000000 --- a/YogaKit/Tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/YogaKit/Tests/YogaKitTests.m b/YogaKit/Tests/YogaKitTests.m deleted file mode 100644 index 34f6018d..00000000 --- a/YogaKit/Tests/YogaKitTests.m +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -#import -#import -#import - -@interface YogaKitTests : XCTestCase -@end - -@implementation YogaKitTests - -- (void)testConfigureLayoutIsNoOpWithNilBlock { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - id block = nil; - XCTAssertNoThrow([view configureLayoutWithBlock:block]); -} - -- (void)testConfigureLayoutBlockWorksWithValidBlock { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - [view configureLayoutWithBlock:^(YGLayout* layout) { - XCTAssertNotNil(layout); - layout.isEnabled = YES; - layout.width = YGPointValue(25); - }]; - - XCTAssertTrue(view.yoga.isEnabled); - XCTAssertEqual(view.yoga.width.value, 25); -} - -- (void)testNodesAreDeallocedWithSingleView { - __weak YGLayout* layoutRef = nil; - - @autoreleasepool { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - view.yoga.flexBasis = YGPointValue(1); - - layoutRef = view.yoga; - XCTAssertNotNil(layoutRef); - - view = nil; - } - - XCTAssertNil(layoutRef); -} - -- (void)testNodesAreDeallocedCascade { - __weak YGLayout* topLayout = nil; - __weak YGLayout* subviewLayout = nil; - - @autoreleasepool { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - topLayout = view.yoga; - topLayout.flexBasis = YGPointValue(1); - - UIView* subview = [[UIView alloc] initWithFrame:CGRectZero]; - subviewLayout = subview.yoga; - subviewLayout.flexBasis = YGPointValue(1); - - view = nil; - } - - XCTAssertNil(topLayout); - XCTAssertNil(subviewLayout); -} - -- (void)testIsEnabled { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - XCTAssertFalse(view.yoga.isEnabled); - - view.yoga.isEnabled = YES; - XCTAssertTrue(view.yoga.isEnabled); - - view.yoga.isEnabled = NO; - XCTAssertFalse(view.yoga.isEnabled); -} - -- (void)testSizeThatFitsAsserts { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - dispatch_sync( - dispatch_queue_create("com.facebook.Yoga.testing", DISPATCH_QUEUE_SERIAL), - ^(void) { - XCTAssertThrows(view.yoga.intrinsicSize); - }); -} - -- (void)testSizeThatFitsSmoke { - UIView* container = [[UIView alloc] initWithFrame:CGRectZero]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - container.yoga.alignItems = YGAlignFlexStart; - - UILabel* longTextLabel = [[UILabel alloc] initWithFrame:CGRectZero]; - longTextLabel.text = - @"This is a very very very very very very very very long piece of text."; - longTextLabel.lineBreakMode = NSLineBreakByTruncatingTail; - longTextLabel.numberOfLines = 1; - longTextLabel.yoga.isEnabled = YES; - longTextLabel.yoga.flexShrink = 1; - [container addSubview:longTextLabel]; - - UIView* textBadgeView = [[UIView alloc] initWithFrame:CGRectZero]; - textBadgeView.yoga.isEnabled = YES; - textBadgeView.yoga.margin = YGPointValue(0); - textBadgeView.yoga.width = YGPointValue(10); - textBadgeView.yoga.height = YGPointValue(10); - [container addSubview:textBadgeView]; - - const CGSize textBadgeViewSize = textBadgeView.yoga.intrinsicSize; - XCTAssertEqual(textBadgeViewSize.height, 10); - XCTAssertEqual(textBadgeViewSize.width, 10); - - const CGSize containerSize = container.yoga.intrinsicSize; - const CGSize longTextLabelSize = longTextLabel.yoga.intrinsicSize; - - XCTAssertEqual(longTextLabelSize.height, containerSize.height); - XCTAssertEqual( - longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, - containerSize.width); -} - -- (void)testSizeThatFitsEmptyView { - UIView* view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)]; - view.yoga.isEnabled = YES; - - const CGSize viewSize = view.yoga.intrinsicSize; - XCTAssertEqual(viewSize.height, 0); - XCTAssertEqual(viewSize.width, 0); -} - -- (void)testPreservingOrigin { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 50, 75)]; - container.yoga.isEnabled = YES; - - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - view.yoga.isEnabled = YES; - view.yoga.flexBasis = YGPointValue(0); - view.yoga.flexGrow = 1; - [container addSubview:view]; - - UIView* view2 = [[UIView alloc] initWithFrame:CGRectZero]; - view2.yoga.isEnabled = YES; - view2.yoga.marginTop = YGPointValue(25); - view2.yoga.flexBasis = YGPointValue(0); - view2.yoga.flexGrow = 1; - [container addSubview:view2]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - XCTAssertEqual(50, view2.frame.origin.y); - - [view2.yoga applyLayoutPreservingOrigin:NO]; - XCTAssertEqual(25, view2.frame.origin.y); -} - -- (void)testContainerWithFlexibleWidthGetsCorrectlySized { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; - container.yoga.isEnabled = YES; - - UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; - view.yoga.isEnabled = YES; - view.yoga.width = YGPointValue(100); - view.yoga.height = YGPointValue(100); - [container addSubview:view]; - - [container.yoga - applyLayoutPreservingOrigin:YES - dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth]; - XCTAssertEqual(100, container.frame.size.width); - XCTAssertEqual(200, container.frame.size.height); -} - -- (void)testContainerWithFlexibleHeightGetsCorrectlySized { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; - container.yoga.isEnabled = YES; - - UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; - view.yoga.isEnabled = YES; - view.yoga.width = YGPointValue(100); - view.yoga.height = YGPointValue(100); - [container addSubview:view]; - - [container.yoga - applyLayoutPreservingOrigin:YES - dimensionFlexibility:YGDimensionFlexibilityFlexibleHeight]; - XCTAssertEqual(200, container.frame.size.width); - XCTAssertEqual(100, container.frame.size.height); -} - -- (void)testContainerWithFlexibleWidthAndHeightGetsCorrectlySized { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; - container.yoga.isEnabled = YES; - - UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; - view.yoga.isEnabled = YES; - view.yoga.width = YGPointValue(100); - view.yoga.height = YGPointValue(100); - [container addSubview:view]; - - [container.yoga - applyLayoutPreservingOrigin:YES - dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth | - YGDimensionFlexibilityFlexibleHeight]; - XCTAssertEqual(100, container.frame.size.width); - XCTAssertEqual(100, container.frame.size.height); -} - -- (void)testMarkingDirtyOnlyWorksOnLeafNodes { - UIView* container = [[UIView alloc] initWithFrame:CGRectZero]; - container.yoga.isEnabled = YES; - - UIView* subview = [[UIView alloc] initWithFrame:CGRectZero]; - subview.yoga.isEnabled = YES; - [container addSubview:subview]; - - XCTAssertFalse(container.yoga.isDirty); - [container.yoga markDirty]; - XCTAssertFalse(container.yoga.isDirty); - - XCTAssertFalse(subview.yoga.isDirty); - [subview.yoga markDirty]; - XCTAssertTrue(subview.yoga.isDirty); -} - -- (void)testThatMarkingLeafsAsDirtyWillTriggerASizeRecalculation { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 500, 50)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - container.yoga.alignItems = YGAlignFlexStart; - - UILabel* view = [[UILabel alloc] initWithFrame:CGRectZero]; - view.text = @"This is a short text."; - view.numberOfLines = 1; - view.yoga.isEnabled = YES; - [container addSubview:view]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - CGSize const viewSizeAfterFirstPass = view.frame.size; - - view.text = @"This is a slightly longer text."; - XCTAssertTrue(CGSizeEqualToSize(view.frame.size, viewSizeAfterFirstPass)); - - [view.yoga markDirty]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - XCTAssertFalse(CGSizeEqualToSize(view.frame.size, viewSizeAfterFirstPass)); -} - -- (void)testFrameAndOriginPlacement { - // https://www.internalfb.com/intern/test/562950017690956 - XCTSkip( - @"TODO: this test fails with actual dimensions off by 1px from expected"); - - const CGSize containerSize = CGSizeMake(320, 50); - - UIView* container = [[UIView alloc] - initWithFrame:CGRectMake( - 0, 0, containerSize.width, containerSize.height)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.flexGrow = 1; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.flexGrow = 1; - [container addSubview:subview2]; - - UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero]; - subview3.yoga.isEnabled = YES; - subview3.yoga.flexGrow = 1; - [container addSubview:subview3]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertEqualWithAccuracy( - subview2.frame.origin.x, CGRectGetMaxX(subview1.frame), FLT_EPSILON); - XCTAssertEqualWithAccuracy( - subview3.frame.origin.x, CGRectGetMaxX(subview2.frame), FLT_EPSILON); - - CGFloat totalWidth = 0; - for (UIView* view in container.subviews) { - totalWidth += view.bounds.size.width; - } - - XCTAssertEqual( - containerSize.width, - totalWidth, - @"The container's width is %.6f, the subviews take up %.6f", - containerSize.width, - totalWidth); -} - -- (void)testThatLayoutIsCorrectWhenWeSwapViewOrder { - const CGSize containerSize = CGSizeMake(300, 50); - - UIView* container = [[UIView alloc] - initWithFrame:CGRectMake( - 0, 0, containerSize.width, containerSize.height)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.flexGrow = 1; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.flexGrow = 1; - [container addSubview:subview2]; - - UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero]; - subview3.yoga.isEnabled = YES; - subview3.yoga.flexGrow = 1; - [container addSubview:subview3]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertTrue(CGRectEqualToRect(subview1.frame, CGRectMake(0, 0, 100, 50))); - XCTAssertTrue(CGRectEqualToRect(subview2.frame, CGRectMake(100, 0, 100, 50))); - XCTAssertTrue(CGRectEqualToRect(subview3.frame, CGRectMake(200, 0, 100, 50))); - - [container exchangeSubviewAtIndex:2 withSubviewAtIndex:0]; - subview2.yoga.isIncludedInLayout = NO; - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertTrue(CGRectEqualToRect(subview3.frame, CGRectMake(0, 0, 150, 50))); - XCTAssertTrue(CGRectEqualToRect(subview1.frame, CGRectMake(150, 0, 150, 50))); - - // this frame shouldn't have been modified since last time. - XCTAssertTrue(CGRectEqualToRect(subview2.frame, CGRectMake(100, 0, 100, 50))); -} - -- (void)testThatWeRespectIncludeInLayoutFlag { - const CGSize containerSize = CGSizeMake(300, 50); - - UIView* container = [[UIView alloc] - initWithFrame:CGRectMake( - 0, 0, containerSize.width, containerSize.height)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.flexGrow = 1; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.flexGrow = 1; - [container addSubview:subview2]; - - UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero]; - subview3.yoga.isEnabled = YES; - subview3.yoga.flexGrow = 1; - [container addSubview:subview3]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - - for (UIView* subview in container.subviews) { - XCTAssertEqual(subview.bounds.size.width, 100); - } - - subview3.yoga.isIncludedInLayout = NO; - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertEqual(subview1.bounds.size.width, 150); - XCTAssertEqual(subview2.bounds.size.width, 150); - - // We don't set the frame to zero, so, it should be set to what it was - // previously at. - XCTAssertEqual(subview3.bounds.size.width, 100); -} - -- (void)testThatNumberOfChildrenIsCorrectWhenWeIgnoreSubviews { - UIView* container = [[UIView alloc] initWithFrame:CGRectZero]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.isIncludedInLayout = NO; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.isIncludedInLayout = NO; - [container addSubview:subview2]; - - UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero]; - subview3.yoga.isEnabled = YES; - subview3.yoga.isIncludedInLayout = YES; - [container addSubview:subview3]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - XCTAssertEqual(container.yoga.numberOfChildren, 1); - - subview2.yoga.isIncludedInLayout = YES; - [container.yoga applyLayoutPreservingOrigin:YES]; - XCTAssertEqual(container.yoga.numberOfChildren, 2); -} - -- (void)testThatViewNotIncludedInFirstLayoutPassAreIncludedInSecond { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionRow; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.flexGrow = 1; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.flexGrow = 1; - [container addSubview:subview2]; - - UIView* subview3 = [[UIView alloc] initWithFrame:CGRectZero]; - subview3.yoga.isEnabled = YES; - subview3.yoga.flexGrow = 1; - subview3.yoga.isIncludedInLayout = NO; - [container addSubview:subview3]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertEqual(subview1.bounds.size.width, 150); - XCTAssertEqual(subview2.bounds.size.width, 150); - XCTAssertEqual(subview3.bounds.size.width, 0); - - subview3.yoga.isIncludedInLayout = YES; - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertEqual(subview1.bounds.size.width, 100); - XCTAssertEqual(subview2.bounds.size.width, 100); - XCTAssertEqual(subview3.bounds.size.width, 100); -} - -- (void)testIsLeafFlag { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - XCTAssertTrue(view.yoga.isLeaf); - - for (int i = 0; i < 10; i++) { - UIView* subview = [[UIView alloc] initWithFrame:CGRectZero]; - [view addSubview:subview]; - } - XCTAssertTrue(view.yoga.isLeaf); - - view.yoga.isEnabled = YES; - view.yoga.width = YGPointValue(50); - XCTAssertTrue(view.yoga.isLeaf); - - UIView* const subview = view.subviews[0]; - subview.yoga.isEnabled = YES; - subview.yoga.width = YGPointValue(50); - XCTAssertFalse(view.yoga.isLeaf); -} - -- (void)testThatWeCorrectlyAttachNestedViews { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)]; - container.yoga.isEnabled = YES; - container.yoga.flexDirection = YGFlexDirectionColumn; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - subview1.yoga.width = YGPointValue(100); - subview1.yoga.flexGrow = 1; - subview1.yoga.flexDirection = YGFlexDirectionColumn; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - subview2.yoga.width = YGPointValue(150); - subview2.yoga.flexGrow = 1; - subview2.yoga.flexDirection = YGFlexDirectionColumn; - [container addSubview:subview2]; - - for (UIView* view in @[ subview1, subview2 ]) { - UIView* someView = [[UIView alloc] initWithFrame:CGRectZero]; - someView.yoga.isEnabled = YES; - someView.yoga.flexGrow = 1; - [view addSubview:someView]; - } - [container.yoga applyLayoutPreservingOrigin:YES]; - - // Add the same amount of new views, reapply layout. - for (UIView* view in @[ subview1, subview2 ]) { - UIView* someView = [[UIView alloc] initWithFrame:CGRectZero]; - someView.yoga.isEnabled = YES; - someView.yoga.flexGrow = 1; - [view addSubview:someView]; - } - [container.yoga applyLayoutPreservingOrigin:YES]; - - XCTAssertEqual(subview1.bounds.size.width, 100); - XCTAssertEqual(subview1.bounds.size.height, 25); - for (UIView* subview in subview1.subviews) { - const CGSize subviewSize = subview.bounds.size; - XCTAssertNotEqual(subviewSize.width, 0); - XCTAssertNotEqual(subviewSize.height, 0); - XCTAssertFalse(isnan(subviewSize.height)); - XCTAssertFalse(isnan(subviewSize.width)); - } - - XCTAssertEqual(subview2.bounds.size.width, 150); - XCTAssertEqual(subview2.bounds.size.height, 25); - for (UIView* subview in subview2.subviews) { - const CGSize subviewSize = subview.bounds.size; - XCTAssertNotEqual(subviewSize.width, 0); - XCTAssertNotEqual(subviewSize.height, 0); - XCTAssertFalse(isnan(subviewSize.height)); - XCTAssertFalse(isnan(subviewSize.width)); - } -} - -- (void)testThatANonLeafNodeCanBecomeALeafNode { - UIView* container = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)]; - container.yoga.isEnabled = YES; - - UIView* subview1 = [[UIView alloc] initWithFrame:CGRectZero]; - subview1.yoga.isEnabled = YES; - [container addSubview:subview1]; - - UIView* subview2 = [[UIView alloc] initWithFrame:CGRectZero]; - subview2.yoga.isEnabled = YES; - [subview1 addSubview:subview2]; - - [container.yoga applyLayoutPreservingOrigin:YES]; - [subview2 removeFromSuperview]; - [container.yoga applyLayoutPreservingOrigin:YES]; -} - -- (void)testPointPercent { - XCTAssertEqual(YGPointValue(1).value, 1); - XCTAssertEqual(YGPointValue(1).unit, YGUnitPoint); - XCTAssertEqual(YGPercentValue(2).value, 2); - XCTAssertEqual(YGPercentValue(2).unit, YGUnitPercent); -} - -- (void)testPositionalPropertiesWork { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - - view.yoga.left = YGPointValue(1); - XCTAssertEqual(view.yoga.left.value, 1); - XCTAssertEqual(view.yoga.left.unit, YGUnitPoint); - view.yoga.left = YGPercentValue(2); - XCTAssertEqual(view.yoga.left.value, 2); - XCTAssertEqual(view.yoga.left.unit, YGUnitPercent); - - view.yoga.right = YGPointValue(3); - XCTAssertEqual(view.yoga.right.value, 3); - XCTAssertEqual(view.yoga.right.unit, YGUnitPoint); - view.yoga.right = YGPercentValue(4); - XCTAssertEqual(view.yoga.right.value, 4); - XCTAssertEqual(view.yoga.right.unit, YGUnitPercent); - - view.yoga.top = YGPointValue(5); - XCTAssertEqual(view.yoga.top.value, 5); - XCTAssertEqual(view.yoga.top.unit, YGUnitPoint); - view.yoga.top = YGPercentValue(6); - XCTAssertEqual(view.yoga.top.value, 6); - XCTAssertEqual(view.yoga.top.unit, YGUnitPercent); - - view.yoga.bottom = YGPointValue(7); - XCTAssertEqual(view.yoga.bottom.value, 7); - XCTAssertEqual(view.yoga.bottom.unit, YGUnitPoint); - view.yoga.bottom = YGPercentValue(8); - XCTAssertEqual(view.yoga.bottom.value, 8); - XCTAssertEqual(view.yoga.bottom.unit, YGUnitPercent); - - view.yoga.start = YGPointValue(9); - XCTAssertEqual(view.yoga.start.value, 9); - XCTAssertEqual(view.yoga.start.unit, YGUnitPoint); - view.yoga.start = YGPercentValue(10); - XCTAssertEqual(view.yoga.start.value, 10); - XCTAssertEqual(view.yoga.start.unit, YGUnitPercent); - - view.yoga.end = YGPointValue(11); - XCTAssertEqual(view.yoga.end.value, 11); - XCTAssertEqual(view.yoga.end.unit, YGUnitPoint); - view.yoga.end = YGPercentValue(12); - XCTAssertEqual(view.yoga.end.value, 12); - XCTAssertEqual(view.yoga.end.unit, YGUnitPercent); -} - -- (void)testMarginPropertiesWork { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - - view.yoga.margin = YGPointValue(1); - XCTAssertEqual(view.yoga.margin.value, 1); - XCTAssertEqual(view.yoga.margin.unit, YGUnitPoint); - view.yoga.margin = YGPercentValue(2); - XCTAssertEqual(view.yoga.margin.value, 2); - XCTAssertEqual(view.yoga.margin.unit, YGUnitPercent); - - view.yoga.marginHorizontal = YGPointValue(3); - XCTAssertEqual(view.yoga.marginHorizontal.value, 3); - XCTAssertEqual(view.yoga.marginHorizontal.unit, YGUnitPoint); - view.yoga.marginHorizontal = YGPercentValue(4); - XCTAssertEqual(view.yoga.marginHorizontal.value, 4); - XCTAssertEqual(view.yoga.marginHorizontal.unit, YGUnitPercent); - - view.yoga.marginVertical = YGPointValue(5); - XCTAssertEqual(view.yoga.marginVertical.value, 5); - XCTAssertEqual(view.yoga.marginVertical.unit, YGUnitPoint); - view.yoga.marginVertical = YGPercentValue(6); - XCTAssertEqual(view.yoga.marginVertical.value, 6); - XCTAssertEqual(view.yoga.marginVertical.unit, YGUnitPercent); - - view.yoga.marginLeft = YGPointValue(7); - XCTAssertEqual(view.yoga.marginLeft.value, 7); - XCTAssertEqual(view.yoga.marginLeft.unit, YGUnitPoint); - view.yoga.marginLeft = YGPercentValue(8); - XCTAssertEqual(view.yoga.marginLeft.value, 8); - XCTAssertEqual(view.yoga.marginLeft.unit, YGUnitPercent); - - view.yoga.marginRight = YGPointValue(9); - XCTAssertEqual(view.yoga.marginRight.value, 9); - XCTAssertEqual(view.yoga.marginRight.unit, YGUnitPoint); - view.yoga.marginRight = YGPercentValue(10); - XCTAssertEqual(view.yoga.marginRight.value, 10); - XCTAssertEqual(view.yoga.marginRight.unit, YGUnitPercent); - - view.yoga.marginTop = YGPointValue(11); - XCTAssertEqual(view.yoga.marginTop.value, 11); - XCTAssertEqual(view.yoga.marginTop.unit, YGUnitPoint); - view.yoga.marginTop = YGPercentValue(12); - XCTAssertEqual(view.yoga.marginTop.value, 12); - XCTAssertEqual(view.yoga.marginTop.unit, YGUnitPercent); - - view.yoga.marginBottom = YGPointValue(13); - XCTAssertEqual(view.yoga.marginBottom.value, 13); - XCTAssertEqual(view.yoga.marginBottom.unit, YGUnitPoint); - view.yoga.marginBottom = YGPercentValue(14); - XCTAssertEqual(view.yoga.marginBottom.value, 14); - XCTAssertEqual(view.yoga.marginBottom.unit, YGUnitPercent); - - view.yoga.marginStart = YGPointValue(15); - XCTAssertEqual(view.yoga.marginStart.value, 15); - XCTAssertEqual(view.yoga.marginStart.unit, YGUnitPoint); - view.yoga.marginStart = YGPercentValue(16); - XCTAssertEqual(view.yoga.marginStart.value, 16); - XCTAssertEqual(view.yoga.marginStart.unit, YGUnitPercent); - - view.yoga.marginEnd = YGPointValue(17); - XCTAssertEqual(view.yoga.marginEnd.value, 17); - XCTAssertEqual(view.yoga.marginEnd.unit, YGUnitPoint); - view.yoga.marginEnd = YGPercentValue(18); - XCTAssertEqual(view.yoga.marginEnd.value, 18); - XCTAssertEqual(view.yoga.marginEnd.unit, YGUnitPercent); -} - -- (void)testPaddingPropertiesWork { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - - view.yoga.padding = YGPointValue(1); - XCTAssertEqual(view.yoga.padding.value, 1); - XCTAssertEqual(view.yoga.padding.unit, YGUnitPoint); - view.yoga.padding = YGPercentValue(2); - XCTAssertEqual(view.yoga.padding.value, 2); - XCTAssertEqual(view.yoga.padding.unit, YGUnitPercent); - - view.yoga.paddingHorizontal = YGPointValue(3); - XCTAssertEqual(view.yoga.paddingHorizontal.value, 3); - XCTAssertEqual(view.yoga.paddingHorizontal.unit, YGUnitPoint); - view.yoga.paddingHorizontal = YGPercentValue(4); - XCTAssertEqual(view.yoga.paddingHorizontal.value, 4); - XCTAssertEqual(view.yoga.paddingHorizontal.unit, YGUnitPercent); - - view.yoga.paddingVertical = YGPointValue(5); - XCTAssertEqual(view.yoga.paddingVertical.value, 5); - XCTAssertEqual(view.yoga.paddingVertical.unit, YGUnitPoint); - view.yoga.paddingVertical = YGPercentValue(6); - XCTAssertEqual(view.yoga.paddingVertical.value, 6); - XCTAssertEqual(view.yoga.paddingVertical.unit, YGUnitPercent); - - view.yoga.paddingLeft = YGPointValue(7); - XCTAssertEqual(view.yoga.paddingLeft.value, 7); - XCTAssertEqual(view.yoga.paddingLeft.unit, YGUnitPoint); - view.yoga.paddingLeft = YGPercentValue(8); - XCTAssertEqual(view.yoga.paddingLeft.value, 8); - XCTAssertEqual(view.yoga.paddingLeft.unit, YGUnitPercent); - - view.yoga.paddingRight = YGPointValue(9); - XCTAssertEqual(view.yoga.paddingRight.value, 9); - XCTAssertEqual(view.yoga.paddingRight.unit, YGUnitPoint); - view.yoga.paddingRight = YGPercentValue(10); - XCTAssertEqual(view.yoga.paddingRight.value, 10); - XCTAssertEqual(view.yoga.paddingRight.unit, YGUnitPercent); - - view.yoga.paddingTop = YGPointValue(11); - XCTAssertEqual(view.yoga.paddingTop.value, 11); - XCTAssertEqual(view.yoga.paddingTop.unit, YGUnitPoint); - view.yoga.paddingTop = YGPercentValue(12); - XCTAssertEqual(view.yoga.paddingTop.value, 12); - XCTAssertEqual(view.yoga.paddingTop.unit, YGUnitPercent); - - view.yoga.paddingBottom = YGPointValue(13); - XCTAssertEqual(view.yoga.paddingBottom.value, 13); - XCTAssertEqual(view.yoga.paddingBottom.unit, YGUnitPoint); - view.yoga.paddingBottom = YGPercentValue(14); - XCTAssertEqual(view.yoga.paddingBottom.value, 14); - XCTAssertEqual(view.yoga.paddingBottom.unit, YGUnitPercent); - - view.yoga.paddingStart = YGPointValue(15); - XCTAssertEqual(view.yoga.paddingStart.value, 15); - XCTAssertEqual(view.yoga.paddingStart.unit, YGUnitPoint); - view.yoga.paddingStart = YGPercentValue(16); - XCTAssertEqual(view.yoga.paddingStart.value, 16); - XCTAssertEqual(view.yoga.paddingStart.unit, YGUnitPercent); - - view.yoga.paddingEnd = YGPointValue(17); - XCTAssertEqual(view.yoga.paddingEnd.value, 17); - XCTAssertEqual(view.yoga.paddingEnd.unit, YGUnitPoint); - view.yoga.paddingEnd = YGPercentValue(18); - XCTAssertEqual(view.yoga.paddingEnd.value, 18); - XCTAssertEqual(view.yoga.paddingEnd.unit, YGUnitPercent); -} - -- (void)testBorderWidthPropertiesWork { - UIView* view = [[UIView alloc] initWithFrame:CGRectZero]; - - view.yoga.borderWidth = 1; - XCTAssertEqual(view.yoga.borderWidth, 1); - - view.yoga.borderLeftWidth = 2; - XCTAssertEqual(view.yoga.borderLeftWidth, 2); - - view.yoga.borderRightWidth = 3; - XCTAssertEqual(view.yoga.borderRightWidth, 3); - - view.yoga.borderTopWidth = 4; - XCTAssertEqual(view.yoga.borderTopWidth, 4); - - view.yoga.borderBottomWidth = 5; - XCTAssertEqual(view.yoga.borderBottomWidth, 5); - - view.yoga.borderStartWidth = 6; - XCTAssertEqual(view.yoga.borderStartWidth, 6); - - view.yoga.borderEndWidth = 7; - XCTAssertEqual(view.yoga.borderEndWidth, 7); -} - -@end diff --git a/YogaKit/YogaKitSample/Podfile b/YogaKit/YogaKitSample/Podfile deleted file mode 100644 index eb814897..00000000 --- a/YogaKit/YogaKitSample/Podfile +++ /dev/null @@ -1,17 +0,0 @@ -use_frameworks! - -platform :ios, "13.4" - -target 'YogaKitSample' do - pod 'YogaKit', :path => '../../YogaKit.podspec' - pod 'Yoga', :path => '../../Yoga.podspec' - pod 'IGListKit', '~> 4.0.0' -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.4' - end - end -end diff --git a/YogaKit/YogaKitSample/Podfile.lock b/YogaKit/YogaKitSample/Podfile.lock deleted file mode 100644 index a3207cc7..00000000 --- a/YogaKit/YogaKitSample/Podfile.lock +++ /dev/null @@ -1,33 +0,0 @@ -PODS: - - IGListDiffKit (4.0.0) - - IGListKit (4.0.0): - - IGListDiffKit (= 4.0.0) - - Yoga (2.0.0-beta.1) - - YogaKit (2.0.0-beta.1): - - Yoga (~> 2.0.0-beta.1) - -DEPENDENCIES: - - IGListKit (~> 4.0.0) - - Yoga (from `../../Yoga.podspec`) - - YogaKit (from `../../YogaKit.podspec`) - -SPEC REPOS: - trunk: - - IGListDiffKit - - IGListKit - -EXTERNAL SOURCES: - Yoga: - :path: "../../Yoga.podspec" - YogaKit: - :path: "../../YogaKit.podspec" - -SPEC CHECKSUMS: - IGListDiffKit: 665d6cf43ce726e676013db9c7d6c4294259b6b2 - IGListKit: fd5a5d21935298f5849fa49d426843cff97b77c7 - Yoga: 090c6851e548d085d6211b5466b57ba8f4013a90 - YogaKit: 5ae1939cd7516fdf6c343abb4b4aa381c9911ccf - -PODFILE CHECKSUM: e5d9841ef739884db00a29f2d529d16bf247a4ca - -COCOAPODS: 1.12.1 diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj deleted file mode 100644 index 22c9849d..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,518 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 13687D531DF8748400E7C260 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13687D521DF8748400E7C260 /* Assets.xcassets */; }; - 13687D851DF87D1E00E7C260 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D841DF87D1E00E7C260 /* UIKit.framework */; }; - 13687D871DF87D2400E7C260 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D861DF87D2400E7C260 /* Foundation.framework */; }; - 15A7CB5995C9DAB1C8803834 /* Pods_YogaKitSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */; }; - 40BD9F461E477A09002790A9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F451E477A09002790A9 /* AppDelegate.swift */; }; - 40BD9F4B1E47850C002790A9 /* BasicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */; }; - 40BD9F501E479079002790A9 /* SingleLabelCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */; }; - 40BD9F521E479173002790A9 /* LayoutInclusionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */; }; - 638A94481E1F06D100A726AD /* ExamplesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 638A94471E1F06D100A726AD /* ExamplesViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 638A94541E215CC800A726AD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 13687D3B1DF8748300E7C260 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13687D421DF8748300E7C260; - remoteInfo = YogaKitSample; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 13687D771DF878A000E7C260 /* yoga */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = include/yoga; - dstSubfolderSpec = 16; - files = ( - ); - name = yoga; - runOnlyForDeploymentPostprocessing = 0; - }; - 13687D7B1DF878CE00E7C260 /* YogaKit */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = include/YogaKit; - dstSubfolderSpec = 16; - files = ( - ); - name = YogaKit; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 13687D431DF8748400E7C260 /* YogaKitSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13687D521DF8748400E7C260 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 13687D571DF8748400E7C260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 13687D841DF87D1E00E7C260 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 13687D861DF87D2400E7C260 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.debug.xcconfig"; sourceTree = ""; }; - 40BD9F451E477A09002790A9 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BasicViewController.swift; path = ViewControllers/BasicViewController.swift; sourceTree = ""; }; - 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SingleLabelCollectionCell.swift; path = Views/SingleLabelCollectionCell.swift; sourceTree = ""; }; - 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LayoutInclusionViewController.swift; path = ViewControllers/LayoutInclusionViewController.swift; sourceTree = ""; }; - 638A94471E1F06D100A726AD /* ExamplesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesViewController.swift; sourceTree = ""; }; - 638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YogaKitSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.release.xcconfig"; sourceTree = ""; }; - C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13687D401DF8748300E7C260 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 13687D871DF87D2400E7C260 /* Foundation.framework in Frameworks */, - 13687D851DF87D1E00E7C260 /* UIKit.framework in Frameworks */, - 15A7CB5995C9DAB1C8803834 /* Pods_YogaKitSample.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 638A944C1E215CC800A726AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 13687D3A1DF8748300E7C260 = { - isa = PBXGroup; - children = ( - 13687D451DF8748400E7C260 /* YogaKitSample */, - 13687D441DF8748400E7C260 /* Products */, - 13687D831DF87D1E00E7C260 /* Frameworks */, - E1C759E3C8E84821213ECE8D /* Pods */, - ); - sourceTree = ""; - }; - 13687D441DF8748400E7C260 /* Products */ = { - isa = PBXGroup; - children = ( - 13687D431DF8748400E7C260 /* YogaKitSample.app */, - 638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 13687D451DF8748400E7C260 /* YogaKitSample */ = { - isa = PBXGroup; - children = ( - 40BD9F4E1E47902F002790A9 /* Views */, - 40BD9F481E4784B3002790A9 /* ViewControllers */, - 638A94471E1F06D100A726AD /* ExamplesViewController.swift */, - 13687D521DF8748400E7C260 /* Assets.xcassets */, - 13687D571DF8748400E7C260 /* Info.plist */, - 40BD9F451E477A09002790A9 /* AppDelegate.swift */, - ); - path = YogaKitSample; - sourceTree = ""; - }; - 13687D831DF87D1E00E7C260 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 13687D861DF87D2400E7C260 /* Foundation.framework */, - 13687D841DF87D1E00E7C260 /* UIKit.framework */, - C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 40BD9F481E4784B3002790A9 /* ViewControllers */ = { - isa = PBXGroup; - children = ( - 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */, - 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */, - ); - name = ViewControllers; - sourceTree = ""; - }; - 40BD9F4E1E47902F002790A9 /* Views */ = { - isa = PBXGroup; - children = ( - 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */, - ); - name = Views; - sourceTree = ""; - }; - E1C759E3C8E84821213ECE8D /* Pods */ = { - isa = PBXGroup; - children = ( - 1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */, - 82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13687D421DF8748300E7C260 /* YogaKitSample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13687D5A1DF8748400E7C260 /* Build configuration list for PBXNativeTarget "YogaKitSample" */; - buildPhases = ( - 513B543F92B2E4F4D1EE1CE7 /* [CP] Check Pods Manifest.lock */, - 13687D771DF878A000E7C260 /* yoga */, - 13687D7B1DF878CE00E7C260 /* YogaKit */, - 13687D3F1DF8748300E7C260 /* Sources */, - 13687D401DF8748300E7C260 /* Frameworks */, - 13687D411DF8748300E7C260 /* Resources */, - FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = YogaKitSample; - productName = YogaKitSample; - productReference = 13687D431DF8748400E7C260 /* YogaKitSample.app */; - productType = "com.apple.product-type.application"; - }; - 638A944E1E215CC800A726AD /* YogaKitSampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 638A94561E215CC800A726AD /* Build configuration list for PBXNativeTarget "YogaKitSampleTests" */; - buildPhases = ( - 638A944B1E215CC800A726AD /* Sources */, - 638A944C1E215CC800A726AD /* Frameworks */, - 638A944D1E215CC800A726AD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 638A94551E215CC800A726AD /* PBXTargetDependency */, - ); - name = YogaKitSampleTests; - productName = YogaKitSampleTests; - productReference = 638A944F1E215CC800A726AD /* YogaKitSampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 13687D3B1DF8748300E7C260 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0820; - ORGANIZATIONNAME = facebook; - TargetAttributes = { - 13687D421DF8748300E7C260 = { - CreatedOnToolsVersion = 8.1; - LastSwiftMigration = 0820; - ProvisioningStyle = Automatic; - }; - 638A944E1E215CC800A726AD = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - TestTargetID = 13687D421DF8748300E7C260; - }; - }; - }; - buildConfigurationList = 13687D3E1DF8748300E7C260 /* Build configuration list for PBXProject "YogaKitSample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 13687D3A1DF8748300E7C260; - productRefGroup = 13687D441DF8748400E7C260 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13687D421DF8748300E7C260 /* YogaKitSample */, - 638A944E1E215CC800A726AD /* YogaKitSampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 13687D411DF8748300E7C260 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13687D531DF8748400E7C260 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 638A944D1E215CC800A726AD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 513B543F92B2E4F4D1EE1CE7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-YogaKitSample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/IGListDiffKit/IGListDiffKit.framework", - "${BUILT_PRODUCTS_DIR}/IGListKit/IGListKit.framework", - "${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework", - "${BUILT_PRODUCTS_DIR}/YogaKit/YogaKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListDiffKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YogaKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13687D3F1DF8748300E7C260 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 40BD9F501E479079002790A9 /* SingleLabelCollectionCell.swift in Sources */, - 40BD9F521E479173002790A9 /* LayoutInclusionViewController.swift in Sources */, - 638A94481E1F06D100A726AD /* ExamplesViewController.swift in Sources */, - 40BD9F4B1E47850C002790A9 /* BasicViewController.swift in Sources */, - 40BD9F461E477A09002790A9 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 638A944B1E215CC800A726AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 638A94551E215CC800A726AD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13687D421DF8748300E7C260 /* YogaKitSample */; - targetProxy = 638A94541E215CC800A726AD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 13687D581DF8748400E7C260 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 13687D591DF8748400E7C260 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 13687D5B1DF8748400E7C260 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = YogaKitSample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.1; - }; - name = Debug; - }; - 13687D5C1DF8748400E7C260 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = YogaKitSample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_INSTALL_OBJC_HEADER = NO; - SWIFT_VERSION = 5.1; - }; - name = Release; - }; - 638A94571E215CC800A726AD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = YogaKitSampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YogaKitSample.app/YogaKitSample"; - }; - name = Debug; - }; - 638A94581E215CC800A726AD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = YogaKitSampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YogaKitSample.app/YogaKitSample"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13687D3E1DF8748300E7C260 /* Build configuration list for PBXProject "YogaKitSample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13687D581DF8748400E7C260 /* Debug */, - 13687D591DF8748400E7C260 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13687D5A1DF8748400E7C260 /* Build configuration list for PBXNativeTarget "YogaKitSample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13687D5B1DF8748400E7C260 /* Debug */, - 13687D5C1DF8748400E7C260 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 638A94561E215CC800A726AD /* Build configuration list for PBXNativeTarget "YogaKitSampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 638A94571E215CC800A726AD /* Debug */, - 638A94581E215CC800A726AD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 13687D3B1DF8748300E7C260 /* Project object */; -} diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b8f12e0b..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcshareddata/xcschemes/YogaKitSample.xcscheme b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcshareddata/xcschemes/YogaKitSample.xcscheme deleted file mode 100644 index ca552e2b..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcshareddata/xcschemes/YogaKitSample.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata b/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c64c0fa8..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift b/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift deleted file mode 100644 index 0685a73f..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.swift +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import Foundation -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? - - func applicationDidFinishLaunching(_ application: UIApplication) { - self.window = UIWindow(frame: UIScreen.main.bounds) - if let window = self.window { - let navigationController = UINavigationController(rootViewController: ExamplesViewController()) - navigationController.navigationBar.isTranslucent = false - - window.rootViewController = navigationController - window.backgroundColor = .white - window.makeKeyAndVisible() - } - } -} diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 6c654c33..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Yoga-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Yoga-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Yoga-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Yoga-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Yoga-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Yoga-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Yoga-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Yoga-57x57@1x.png", - "scale" : "1x" - }, - { - "size" : "57x57", - "idiom" : "iphone", - "filename" : "Yoga-57x57@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Yoga-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Yoga-60x60@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@2x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@2x.png deleted file mode 100644 index bb33d6ef3c653c79052963ba125106568a50a8fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1198 zcmV;f1X25mP)Px(Xh}ptR9Fe^SZi#QMHD^TT_{Vt^g$oAOL-NvwxVolQvyUu%R>_j@c~ka^23O< zY4C>;MIuHG5;bU4Vx!SS<><|ubH{`p6|@eow;inHh?HbOcZky)b0|DbcUi{L0cqG*xup6$%ZEU{znU1 zTQ8xfw@YF3Cy6*Aj3lgrb({@LUR;BoHV>|xy8wGa zJmx=Mg1wvG1^dc&Zidg>3;#bpWaP|(BP|&}eSQ!_1A|hRO!$l`J8`56^7zu75KAl9 z!D_Q%px=+e)hqDu3#)N_PYwDyyWzd&L4DP?D6Uv5`ux7@uv)F4jS7s#m@-He{cfV|V%6LXjAo6+In)qj=-f=r>dg3P*NvZ+JMvC}AcYMB_~ zZa$Cfq6dsr<3L}RSCE*P=n!q}Bj%MZ0c~_p#gr1{O<0H1-_>KfD_3lamY+{yMt&~r zjyTw2$HO)u7O@lUqK$p|MtstrwtAm5QA-KZN%^KNIMJY=7M>uB zpIe0~_s)dJeFanJ&H;nDo6jL-hEtp}N54D_e~3%&g2H@MeX>Kw9nww0k*py?5%hKU zqVCgun3O&l)8^%XNtwFSq&slK^MM5E@7u~bkhNP`WPn@!(nRDo3OtW&<&^}ebb z(oGT^%>sv)%CQ1{GlmXYf~>w+;EWaMJ5+_IB}ihdzF6SgY0zglm7R7CjwBV;WoM9R zR2S|+lKhO?zdlBi-K1F;TDJzi)5+A&48IkN^Mx M07*qoM6N<$f)%ws2mk;8 diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@3x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-20x20@3x.png deleted file mode 100644 index 75f037eb3a72c792b86389b95922859b3f119457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1927 zcmV;22YC32P)Px+K}keGRA>e5T6<7cMHv6_27!30D4-xC`2Yl!)XaR0uLR8`DYZ05P0gCI%$MPS?cQa;bgHSe#<70Bv%2ZNR@GS_63UTEjg7UQe9lCUM?!9Nvy*$**k2##Z zXTSaS`|Y0H{dT|O@JIl51V=mKs!(kw{Ji&gdk?qw@N?Dz&aKI(s_FsC%I|@9qC*D{ z`1-t{+*`|z79-5%J?s1>oXE(;smyc8y`GO^Ly1XV9RvN*BfL8X#KmAxd>o?t_JV_h zgGpIiA38L*<55ythLp73*uD24Zr>@g%D%2$I%DF5F-T6D2!B6ct8|zv)NF+BS5{)< zmLIY6=RJ5>U2U#DUC-U!+%R=YBHo`f174n+HBcp+R}U1h{g%2-Xf;(jF- zFI|q)XR=KyZmEa;W23NU)e3lfS@()tMVMsgEn14pS8`g4mqooVMn+)M+ErGO*6mvI zHD=GY6!uB~MK5#{=9q2m*Vq&(+CW?MLKoqKza4G02}*_tCrhpndLTW9xz0{b zp3`DWj~=7dvRtxurEHO2r=@$CPDM+tvuXl*)3k}U$wG=S-9>s(%>idu7Yvz^s9a1p z2WT5@lz|js`o_)SE_wy}Vak^uA$t5P%EdIF*$Uc58)cwLn7bZs1Z;(;zYiuaUkDE$ zZ|wPMqjE9*`WFkpJX=8|yR_W#Q=Lh}elEQC3)t{LG7Rad*SODWmb$$|dO3BLv5{?`rbsBYP z*+E<9&7N*iOtblTQXvZxsC`(CTiI8eigXMMfs30f4sT3BdEs4*`(zfvb@`}@37l)X+})F}(vN}G9B zW)2p6mgrLYUF`k{^D6Y;TZ3JZ~s|IyZrygk8 z{J3>`G@Fp6(OvvX)Ktk(2#cv z{-Hr|788&W55#Nf^`B$GB_>pi)7*?KWjr%&Ty`i!StF=}x~NkRv~0FWn1|$gke_); zS$@I?_H8O=$QNU?dsjHQIK#I~C*@vr?FM+MpHZe*MUFE$monpWgj?yQsH!X}2QPxpn8#(wxIXg`J~nZkHW|_h(`HFk0w_X`rHFrzgawR6s(j6z_gfwz~G9m`|L-F-nIG27D zF%yO%FgzF!E2Mq|vD{F>F+t zGzn97{pM}hu;m9;G5KV~pcuqY9VfPifv9=#P$}r@;jY}(zd43EW^={cU=8Nac?S#T zzN=YOiZG8)65g0;^{EG2ox7eeF&ndo*^>l&-XN|#F;=})4&u4SH==j}cGy!50w9(LEm{{of1KS)$srXc_T N002ovPDHLkV1jY`no9rx diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@1x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@1x.png deleted file mode 100644 index eace0a4e550c7ae850451ec8cf73a227c4526cf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 868 zcmV-q1DpJbP)Px&9!W$&R7efQR!dJ4Q562B1=0uD@-8(M(ux#`l9bM! z)7yv0G~hT6JMFnBIa&60ru02eKhUN^nN?fVbmoA5{VCM`7uH?LpCsglFX?o|{G zhr_78^8j^Eo-a!vw|M?+8LBF;L9JHHEkiMp)+$IUbWpNaf~+WobS)l6ijY0=$U!1X zNkiW-8f^Otqiqp*h>wLtl(KZ$q~Wu*=yEv7U~;n9|_+(1n113eH=V=zh}%@a;lxnAxgSw6`Px+H%UZ6RA>e5T4`)mMHK$pzU~EDT5Jo2mZfaAWeHF%i)F7Gt05>5h?pp=VU1{v zzz_Ig3`zhasAwWlgG~sg_(PC=rvZdQ5kV*|EwyxgbZ=?F`3C3ls?B|K-)qa#e#v`x z?#!8U&-Z5T%$akZ+kFAF0l2pTj*?AD^t>jHAcXntF!Qb)!edwh*%Wl&?efZ11+L->s*GL8{((GgydE8<%ea6 zI#;1H$e`Nb*<&gal&$7ve{BAwEajXrrTpfJ34@ zh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dm#2ne%W=8ZMV~rUc0RI_p00000NkvXXu0mjf Dr@5po diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@3x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-29x29@3x.png deleted file mode 100644 index b137f9736abee0409dcf359a0e884a008fba9f3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3086 zcmV+p4Ds`cP)Px=$Vo&&RCodHTzOPg#~J@v1O)}zWDytKaW`nuXd6V=OJYu%n#QfRJ?^b>Nwsb?N)UJBLPS7Nb_HY=u=AVCJm14DbLZYCaPIFM z-sR5n&3wN%ckVae%=cXGGmr&S7;rU3swI>&V3BL$K(NTQ$Tg7x6GdAi*CN+M222!f zja-Xd6B#g3v^8=qa!q8wMA7ah%GND9CpVAM(laS7Ba?1r=TKQ`IhB@`QAI^1HE-@o z-d?l9JD`zq6EIP$;c$V1Pdj zit5My`qQxI2T@R9fV2#wE4Vx>$4zBr6&*aBK)d%Ipv0upR9jnXm~O7Ft`t3J0F4_v ziblo^BTr8c!(__{ayq%?Y^Vp31&Ht!Vz-H)&G*Si;D52Ao3frOPR_{DakW@zPai==8)k zdPR1lrSC4F$R1svSk8z{)5+cR_wBT5&04CisWGCzhRAStbEAdxX4CZ7CmAB|aY9TZ z_ikw^{c70BEN&ruUY;OD(;%OzE_dLc4eC zOlwvwrvQIHBgJxAhLf9hGn?iv_$6g#-7>thW(f>$8%m$7{vEXq3o*0_L&?R6o%QzO zMn$Y(69ljObcLZK*f5&}b1bHU#x!CDvACk&=s)x@3Wkx3msew$W1mDE`VT#ff+6I> z+-k^HfecyD1Ns;N3!-*>GVF?Uxt7K@kIc(S2r>9N+u}ZJhrezv3S0$VWM|p;uq&X#tywW8$YP znJKPrt~7LJJmJ)JRcRR&^-L2n_vo;5v2WKV=}k}R z=L);Ds`g*E7ow==$iX(U#6M+4C3OAk3v~NdE+-c0NB_FRf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l8j-roOzAs%<7rA@(|Cg37`@M8yPpW{qa`5YM6geW=_GDmpq9pG&`Li8eu}20O z*dfMFajPIdz8irwY$9Gdm`Er7v4^VJp%o*seAzE3?&T5EB6X2#=7}2^{@7{gJh&hC zggs3oxFWBeILk+RaZbV0ic9CKoVd|NE_%3O^Hy5%;a{XX`&}#GGz~T&gS&KK^KlrT zlQHL3GM_TeIOM0@WOHgdWu8yrFSYL~SGL^ZpS(pgr%jQq#>?v_*E;3+biSpn1tAha z%7~?H%7A_cC*BS^U^0D2e|&92*8s81v!4`;vg^F|%$hal^vTur3or}Y~*j(iw?XZ<>p;gmWGgufNBv}^vn&Z&`?q8A7? zoi}F|O`Z^^yz&wlg9rGh)KM^;?c6koqW*)~}F0iWQU6n#%9zI(^PH z>HBDqVog~@G)PUKL8mNoO(fkS*CN+M222!fja-Xd6B#g3v^8=qa!q8wMA6pBwa7J* c0TV_4A8on&K)HGn`Tzg`07*qoM6N<$f^L)my8r+H diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-40x40@2x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-40x40@2x.png deleted file mode 100644 index 756f173195b4f2a8e91ee2a44d2a4c0136d4900e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2777 zcmV;~3MTc5P)Pxs^|qlL_h^mBZ5H#S`Ee|HPa?>OvlpNX(p*t zTVrEW(=nOGre>VX*m08nkz|}cjHEMtn3!h;ElLemQLzdVl&3Gi2g2p4>HZe?a4uLl zd-hxcne&@D_wL>OzTN$PcOPfJvwOV0WFQ-+8Spl(X)AIDYyuSUImX z2~=c2QQdBVHi3!^D5~2nP?10%MSaWEo11S@RZSgLRo78NV-vYtE^2kP@%$Y@ffN)J zL=oX(6f@aLG0{#62?@5WY?X|@G6Gv$T~t_9OvV2>K}V0Bpt|}?Qg%2eMbf;vsg!nK zDlJ@)Mh-`il)hEMUPHYW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aKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-40x40@3x.png deleted file mode 100644 index 6a0f2cc1a60410431c2e59ac9ab25394e155bbe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4616 zcmV+j68G(iP)Px`!bwCyRCodHT?celMHar4BtRfN^b(RlC`wrn3TtOOcbwq$m}Gzr)MTl|M$18f6qaS2$wcyBxh)$$b-T%~j8GblSJ zk8<!krgbZ7)~u-|MPUhm(@&qJ{Ra=z;iD%g zF)4*oPNq>#ZeFbb3keRQ=*}IfOKddt?B137^y*0++PAG04>Lw?P#-t^OH0dW=Z|}6 z)7G7|W7i(axNuR4Y+JRAq(L|Lr{P26DSlvoYTUSylJBTwTCV^;dMuH?Ub}(TuHQu2 z*|{p^;=(&LG?>PW8cuhN8A;u{b#Zxb)&SE342`1iw``{mm#v^<$CFGU$8K@4G;79G z8Zm4zHE7Vl6nXNL3DW{xR#ryq)^DbdKK_JKQqw%;->2cxQ61^Q=~HO*s03=%$ehi$ zDFNPp;4rhZep4A$_%Gz1IXF z^F!muj-t7b&7!c-5SeTZ@iGm-n^-^l!mDplUfyLx1@d*`pr97?!ZVN4aMnMYfqV{d zNlA%TYnOkz$_(<5mWOHg+^N-OKR-WdJnO>9rvRTlmqAZGyFgo@s7vO}o(2mhufH;% z+O}!sv#k0I;1g`cY0lhdDf3d6&kFC24@ZQD(L0M?p{{I&%opU7-K4$yexaFDuH+Z^qP#x&Cd!I3qwL-$uQt*66{DbhSI66h_4W6# zi}miJ*Qj6L8@-kluK|oc7fsdmRCC>-*gUWqEqU)vul31Z0T`p@=?~4lF8W+|pgM

D1RxX0Ml~q~7|V}V zTcMH(2xJ2psU&56Fg6Y*O_^2i*OpZZAH1=4z4DU}m2FTctHEe~>ifolYH-0HGE&)8 zD*+h$x%G9+&l{jRe*?0D%v6wcfT4+j&3c<^CjrO|vXf2H0fw4QebK~_EleZ)AT!8L zHc15-3Ubh)G9y7b?#9u#Xn$r^l!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L+P=oZ#T~XVaN(0F&H&%zrn>%Ko@FK0{F9&jc;hZ%Zxe8N8cWG zY0d9Yc1yh>%E$kHXz&CVtEyPya|KRhX+?QgI;Ym^w;#sysUP4;eRgWxMY8YTs)&Rw zeX8cEm~l#B*;t4V%K4InATQ^w1x9;49i*>6`88``dp~J%jU{m2qt#(1`Lp9FvAyoR z*L;Hurl%_Dm0vC2wTrE{!KQR7bS|-6ie-3Q?p1S1sIeWZ1Z48JyP=J&Huy4Izw^7!RjKR<{k<-07S>?>L!pn~p zNo|*`7&0G1BjLy4%6s%7;`}gXqar*;>;cirs`>l%H89BpTO1?RBz%sxC4|n#?G4TP z@(WZ~G!A|Iy=o>eHe-PBNqir57~bmsUBOdY?taoxDE@ZWgmi+WX!CY~O8IURw1s;(N>+7gu&=Z%M{UAZ0}I zYb!6A6v-&<-C?ZHh#y*Km?WKSQe*j`X8E01hT0cn!>5B|qXR~(`MnYh36vCd$J!dg y1K>R`xf}}N$#?P-nvumnga7p1+Npav9|;hadq(Ew^Z0f2gF+Zw(|>;1CFVc%C!>`B diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-57x57@2x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-57x57@2x.png deleted file mode 100644 index a41ef252e70d5a2e62026d00fdbdea3656ba1820..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8676 zcmb7qbyOTdwRPZ7|6Gz4Ghe{6OT@INZ9b|N4>Wi_Cb6WjvG!^X|V0TRUk0)fJCb4x)D zY1#jt{xT8)S-ZMA3$n9&czCdRaIrbTt=KsQ1O(VQAnXtb>x%}fi-0^m{nOj*!+vF&xmg z%)XW>;If+`U^SYNCa^U}jgGha0hh|x#% zgnRVANaF@x$=(oPTqRm!LAMcT{-Pt_%X6X7R%dfSDzj_zz5_9ze=gtFb zj*k_#5CQ^_P*6a$v`8B_9MZC~zToJolDvkr8~y8BuLy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;XwEL>vGhOU;1Yf>p9nTjsP5t*CdGYno84hi6$@FHaPNuhy9pjNVke ziIv(N=Z~0Wp)WR1sqYIXl582)aZ5+P^d$aB9)>Pdbk=w>gKXdUclA@_(Ih4;OIm=p zC^CW>aAKFYTeH{a;TIV%JplbmjeFY5pAjIPckVRbNHo@V6(72)GL)JtVFx(P-Ip3)AXgcSE4Yawz#}x;%4z z<(y{JkNR3bmMk~U_+fmACxVacXekA=58>JP7s_Yhk)IuKuwnHX?hh8z;VO8ayO|z` z>=($B^1UEH209gZrRi<97AE$^THFTntZN?KUQOIY3X{5VD;#y{5m4h<)9{- z8=9r`np8D&BM;z}`r@!qat;Jw5&!C*bm=qoEU9{=>0qij7Jc^~0IT&U*I(h2Ux{79 z=0lee!i%#a6xV|Xe0SGLr=nv}D@g#O$jp3?S{lU%z_-|{6(v26QjNYU6EwmY7w}my zm#=8H3gyc1)u)az23bLZ5oqM45SNNzhtNz7y>SLcJ9~hT8Ndqy65tBE8AW&b-NQ@R ze#|(fU&vnM-#^f$zCEXA&JJLlKPP|m6$6EI jpIp$VE&2aX{09d^SEBnXTDR1{e<|c;RHVx#jf4Le)%r~m diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-60x60@2x.png b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Yoga-60x60@2x.png deleted file mode 100644 index 6a0f2cc1a60410431c2e59ac9ab25394e155bbe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4616 zcmV+j68G(iP)Px`!bwCyRCodHT?celMHar4BtRfN^b(RlC`wrn3TtOOcbwq$m}Gzr)MTl|M$18f6qaS2$wcyBxh)$$b-T%~j8GblSJ zk8<!krgbZ7)~u-|MPUhm(@&qJ{Ra=z;iD%g zF)4*oPNq>#ZeFbb3keRQ=*}IfOKddt?B137^y*0++PAG04>Lw?P#-t^OH0dW=Z|}6 z)7G7|W7i(axNuR4Y+JRAq(L|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%)A*obuUP%z zZ%rn{u07rZ2aoy8LU@Ge9%v_aQ!^P5OtO~>k2to$n*)eM>Q(MfcUsGjCiDtZmLrq{ z;EPA3!W*UJzWdY#)Pr~(^w9H~%#%x0vX$)8!Pbc7o$@Np+_nV3K+NEIyFU^$g|CVy zj2_b!*_(^NzQVAf!?86TGz;;7<~JZ~F;chi^El+AqGwnLWT1>>rbMyqd;pF^H|PhJ zo48~er$w5eHM@6f-%}h#E*(4A1kCr*d4z5gBl6dKW^I6;saOAj^VLJd(nSo68HYoe z_}?3!<;7Rw_+7!ftO-LZ61cy3W9`z`Gt(@lZ4IBd7H8!r#MlxXd=&TkoMBo)7qm`D zf|rrae%s-Ckfwg+jPU_KE!A~XnFu{KBKFlmcI9Mi-(PbEa7KeR$Do|1}5kse%Boh>?RaS zSM%)_BZZqkZN{qa zS(^%2{M0T?01?DJu4(2B9i1J z_@ZE;EEje@E6C(0At3=WkK+=0v)2y$RO_)Z-#6Gno=VjWOzccXA|8T? ziAhX|$RP-|YkZ*xA;EY@j6LUr;^h5L5A{*D(!@%#zp~z}yix|SRDDiVggzSG?(ZMc zX{+9Hh+0uLX|Hd-+|4&L?vSpxfKW%U#_~n}&BXIf9VUl+3-rJ{LxuMoZ;s!q=?5ni v*0;bfkv4s|^X>WP NSObjectProtocol { - return title as NSString - } - - fileprivate func isEqual(toDiffableObject object: ListDiffable?) -> Bool { - guard let otherObj = object as? ExampleModel else { return false } - - return (title == otherObj.title) && - (controllerClass == otherObj.controllerClass) - } -} - -final class ExamplesViewController: UIViewController, ListAdapterDataSource, ListSingleSectionControllerDelegate { - - private lazy var adapter: ListAdapter = { - return ListAdapter(updater: ListAdapterUpdater(), viewController: self, workingRangeSize: 0) - }() - private lazy var collectionView: UICollectionView = { - let collectionView = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()) - collectionView.backgroundColor = UIColor.systemBackground - return collectionView - }() - - // Update this to array to create more examples. - private let models: [ExampleModel] = [ExampleModel(title: "Basic Layout", controllerClass: BasicViewController.self), - ExampleModel(title: "Exclude Views in Layout", controllerClass: LayoutInclusionViewController.self)] - - //MARK: UIViewController - - override func viewDidLoad() { - super.viewDidLoad() - title = "Examples" - view.addSubview(collectionView) - adapter.collectionView = collectionView - adapter.dataSource = self - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - collectionView.frame = view.bounds - } - - //MARK: IGListAdapterDataSource - - func objects(for listAdapter: ListAdapter) -> [ListDiffable] { - return models as [ListDiffable] - } - - func listAdapter(_ listAdapter: ListAdapter, sectionControllerFor object: Any) -> ListSectionController { - let sizeBlock: ListSingleSectionCellSizeBlock = { (model, context) in - return CGSize(width: (context?.containerSize.width)!, height: 75.0) - } - - let configureBlock: ListSingleSectionCellConfigureBlock = { (model, cell) in - guard let m = model as? ExampleModel, let c = cell as? SingleLabelCollectionCell else { - return - } - - c.label.text = m.title - } - - let sectionController = ListSingleSectionController(cellClass: SingleLabelCollectionCell.self, - configureBlock: configureBlock, - sizeBlock: sizeBlock) - sectionController.selectionDelegate = self - return sectionController - } - - func emptyView(for listAdapter: ListAdapter) -> UIView? { return nil } - - //MARK: IGListSingleSectionControllerDelegate - func didSelect(_ sectionController: ListSingleSectionController, with object: Any) { - let section = adapter.section(for: sectionController) - let model = models[section] - - let controller = model.controllerClass.init() - controller.title = model.title - - self.navigationController?.pushViewController(controller, animated: true) - } -} diff --git a/YogaKit/YogaKitSample/YogaKitSample/Info.plist b/YogaKit/YogaKitSample/YogaKitSample/Info.plist deleted file mode 100644 index 22ca2cd4..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/YogaKit/YogaKitSample/YogaKitSample/SwiftViewController.swift b/YogaKit/YogaKitSample/YogaKitSample/SwiftViewController.swift deleted file mode 100644 index 0535bc8e..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/SwiftViewController.swift +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import UIKit -import IGListKit -import YogaKit - -struct DemoItem { - let name: String - root.backgroundColor = .red - root.yoga.isEnabled = true - root.yoga.width = YGValue(self.view.bounds.size.width) - root.yoga.height = YGValue(self.view.bounds.size.height) - root.yoga.alignItems = .center -} - -final class SwiftViewController: UIViewController, IGListAdapterDataSource { - - lazy var adapter: IGListAdapter = { - return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0) - }() - let collectionView = IGListCollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()) - - //MARK: UIViewController - - override func viewDidLoad() { - super.viewDidLoad() - title = "YogaKit Examples" - view.addSubview(collectionView) - adapter.collectionView = collectionView - adapter.dataSource = self - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - collectionView.frame = view.bounds - } - - - //MARK: IGListAdapterDataSource - - func objects(for listAdapter: IGListAdapter) -> [IGListDiffable] { - return ["Dustin" as IGListDiffable, "Ryan" as IGListDiffable] - } - - func listAdapter(_ listAdapter: IGListAdapter, sectionControllerFor object: Any) -> IGListSectionController { - let sizeBlock: IGListSingleSectionCellSizeBlock = { (model, context) in - return CGSize(width: (context?.containerSize.width)!, height: 100.0) - } - let configureBlock: IGListSingleSectionCellConfigureBlock = { (model, cell) in - guard let m = model as? String else { - return - } - - cell.backgroundColor = (m == "Dustin") ? .blue : .red - } - - return IGListSingleSectionController(cellClass: UICollectionViewCell.self, - configureBlock: configureBlock, - sizeBlock: sizeBlock) - } - - func emptyView(for listAdapter: IGListAdapter) -> UIView? { - return nil - } -} diff --git a/YogaKit/YogaKitSample/YogaKitSample/ViewController.m b/YogaKit/YogaKitSample/YogaKitSample/ViewController.m deleted file mode 100644 index b0b54d93..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/ViewController.m +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "ViewController.h" - -#import - -@implementation ViewController - -- (void)viewDidLoad { - UIView* root = self.view; - root.backgroundColor = [UIColor redColor]; - root.yoga.isEnabled = YES; - root.yoga.width = YGPointValue(self.view.bounds.size.width); - root.yoga.height = YGPointValue(self.view.bounds.size.height); - root.yoga.alignItems = YGAlignCenter; - root.yoga.justifyContent = YGJustifyCenter; - - UIView* child1 = [UIView new]; - child1.backgroundColor = [UIColor blueColor]; - child1.yoga.isEnabled = YES; - child1.yoga.width = YGPointValue(100); - child1.yoga.height = YGPointValue(100); - - UIView* child2 = [UIView new]; - child2.backgroundColor = [UIColor greenColor]; - child2.frame = (CGRect){ - .size = { - .width = 200, - .height = 100, - }}; - - UIView* child3 = [UIView new]; - child3.backgroundColor = [UIColor yellowColor]; - child3.frame = (CGRect){ - .size = { - .width = 100, - .height = 100, - }}; - - [child2 addSubview:child3]; - [root addSubview:child1]; - [root addSubview:child2]; - [root.yoga applyLayoutPreservingOrigin:NO]; -} - -@end diff --git a/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/BasicViewController.swift b/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/BasicViewController.swift deleted file mode 100644 index 424433e6..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/BasicViewController.swift +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import UIKit -import YogaKit - -final class BasicViewController: UIViewController { - override func viewDidLoad() { - super.viewDidLoad() - let containerSize = self.view.bounds.size - - view.backgroundColor = UIColor.systemBackground - view.configureLayout { (layout) in - layout.isEnabled = true - layout.width = YGValue(containerSize.width) - layout.height = YGValue(containerSize.height) - layout.alignItems = .center - layout.justifyContent = .center - } - - let child1 = UIView() - child1.backgroundColor = .blue - child1.configureLayout { (layout) in - layout.isEnabled = true - layout.width = 100 - layout.height = 10 - layout.marginBottom = 25 - } - view.addSubview(child1) - - let child2 = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) - child2.backgroundColor = .green - child2.configureLayout { (layout) in - layout.isEnabled = true - layout.alignSelf = .flexEnd - layout.width = 200 - layout.height = 200 - } - view.addSubview(child2) - - let child3 = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) - child3.backgroundColor = .yellow - child3.configureLayout { (layout) in - layout.isEnabled = true - layout.alignSelf = .flexStart - layout.width = 100 - layout.height = 100 - - } - view.addSubview(child3) - - view.yoga.applyLayout(preservingOrigin: true) - } -} diff --git a/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/LayoutInclusionViewController.swift b/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/LayoutInclusionViewController.swift deleted file mode 100644 index 2b51d915..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/ViewControllers/LayoutInclusionViewController.swift +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import UIKit -import YogaKit - -final class LayoutInclusionViewController: UIViewController { - private let button: UIButton = UIButton(type: .system) - private let disappearingView: UIView = UIView(frame: .zero) - private let contentView: UIView = UIView(frame: .zero) - - override func viewDidLoad() { - super.viewDidLoad() - let root = self.view! - root.backgroundColor = .white - root.configureLayout { (layout) in - layout.isEnabled = true - layout.flexDirection = .column - layout.justifyContent = .spaceAround - } - - contentView.backgroundColor = .clear - contentView.layer.borderColor = UIColor.lightGray.cgColor - contentView.layer.borderWidth = 1.0 - contentView.configureLayout { (layout) in - layout.isEnabled = true - layout.height = 300 - layout.width = YGValue(self.view.bounds.size.width) - layout.flexDirection = .row - layout.justifyContent = .center - layout.paddingHorizontal = 25 - } - self.view.addSubview(contentView) - - let redView = UIView(frame: .zero) - redView.backgroundColor = .red - redView.configureLayout { (layout) in - layout.isEnabled = true - layout.flexGrow = 1 - layout.flexShrink = 1 - } - contentView.addSubview(redView) - - disappearingView.backgroundColor = .blue - disappearingView.configureLayout { (layout) in - layout.isEnabled = true - layout.flexGrow = 1 - } - contentView.addSubview(disappearingView) - - button.setTitle("Add Blue View", for: .selected) - button.setTitle("Remove Blue View", for: .normal) - button.addTarget(self, action: #selector(buttonWasTapped), for: .touchUpInside) - button.configureLayout { (layout) in - layout.isEnabled = true - layout.height = 300 - layout.width = 300 - layout.alignSelf = .center - } - root.addSubview(button) - - root.yoga.applyLayout(preservingOrigin: false) - } - - // MARK - UIButton Action - @objc func buttonWasTapped() { - button.isSelected = !button.isSelected - - button.isUserInteractionEnabled = false - disappearingView.yoga.isIncludedInLayout = !disappearingView.yoga.isIncludedInLayout - disappearingView.isHidden = !disappearingView.isHidden - - contentView.yoga.applyLayout(preservingOrigin: true) - button.isUserInteractionEnabled = true - } -} diff --git a/YogaKit/YogaKitSample/YogaKitSample/Views/SingleLabelCollectionCell.swift b/YogaKit/YogaKitSample/YogaKitSample/Views/SingleLabelCollectionCell.swift deleted file mode 100644 index 29baf1ac..00000000 --- a/YogaKit/YogaKitSample/YogaKitSample/Views/SingleLabelCollectionCell.swift +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -import UIKit -import YogaKit - -final class SingleLabelCollectionCell: UICollectionViewCell { - let label: UILabel = UILabel(frame: .zero) - - override init(frame: CGRect) { - super.init(frame: frame) - - contentView.configureLayout { (layout) in - layout.isEnabled = true - layout.flexDirection = .column - layout.justifyContent = .flexEnd - } - - label.textAlignment = .center - label.numberOfLines = 1 - label.yoga.isIncludedInLayout = false - contentView.addSubview(label) - - let border = UIView(frame: .zero) - border.backgroundColor = .lightGray - border.configureLayout { (layout) in - layout.isEnabled = true - layout.height = 0.5 - layout.marginHorizontal = 25 - } - contentView.addSubview(border) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func layoutSubviews() { - super.layoutSubviews() - - contentView.yoga.applyLayout(preservingOrigin: false) - label.frame = contentView.bounds - } -} diff --git a/set-version.py b/set-version.py index 37ea57b7..a4c837a3 100755 --- a/set-version.py +++ b/set-version.py @@ -28,10 +28,9 @@ with open("javascript/package.json", "r+") as f: f.seek(0) f.write(new_contents) -for podspec in ["Yoga.podspec", "YogaKit.podspec"]: - with open(podspec, "r+") as f: - new_contents = re.sub( - r"spec\.version = '.*'", f"spec.version = '{version}'", f.read() - ) - f.seek(0) - f.write(new_contents) +with open("Yoga.podspec", "r+") as f: + new_contents = re.sub( + r"spec\.version = '.*'", f"spec.version = '{version}'", f.read() + ) + f.seek(0) + f.write(new_contents) diff --git a/website/contents/contributing/opening-a-pull-request.md b/website/contents/contributing/opening-a-pull-request.md index 4b1d2840..ec549bcf 100644 --- a/website/contents/contributing/opening-a-pull-request.md +++ b/website/contents/contributing/opening-a-pull-request.md @@ -47,8 +47,5 @@ made your change see the [testing documentation](/contributing/testing) for more |-- java | |-- com/facebook/yoga # Java binding code | |-- jni # JNI binding code -|-- android # Android View bindings -|-- YogaKit # iOS UIView bindings |-- javascript # emscripten / javascript bindings -|-- csharp # .NET bindings in c# ```