Skip to content

Yoga version upgrade to 3.2.0 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Example/FlexLayoutSample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import UIKit

@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ class CollectionViewExampleView: UIView {

flowLayout.minimumLineSpacing = 8
flowLayout.minimumInteritemSpacing = 0

if #available(iOS 11.0, *) {
flowLayout.sectionInsetReference = .fromSafeArea
}
flowLayout.sectionInsetReference = .fromSafeArea

collectionView.backgroundColor = .white
collectionView.dataSource = self
Expand Down
12 changes: 6 additions & 6 deletions Example/cocoapods/FlexLayoutSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
249EFE361E64FAFE00165E39 = {
isa = PBXGroup;
children = (
249EFE411E64FAFE00165E39 /* FlexLayoutSample */,
249EFE411E64FAFE00165E39 /* ../FlexLayoutSample */,
461884C59B72ACEAFC912B8A /* Frameworks */,
85CAAE97812075333AF3E88F /* Pods */,
249EFE401E64FAFE00165E39 /* Products */,
Expand All @@ -214,7 +214,7 @@
name = Products;
sourceTree = "<group>";
};
249EFE411E64FAFE00165E39 /* FlexLayoutSample */ = {
249EFE411E64FAFE00165E39 /* ../FlexLayoutSample */ = {
isa = PBXGroup;
children = (
2439CC671E66614D003326FB /* Supporting Files */,
Expand Down Expand Up @@ -589,7 +589,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @CtrlJone , why change the deployment target to 14.0? Is it required?

Copy link
Author

@CtrlJone CtrlJone Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lucdion , This is not necessary, but I noticed that you changed the version dependency to 14.0 in this commit!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions on version issues?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh true, my bad, I forgot that change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,@lucdion ,What should I do next? Can you give me some suggestions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh true, my bad, I forgot that change

Any suggestions on version issues?

MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -645,7 +645,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -664,7 +664,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
GCC_INPUT_FILETYPE = automatic;
INFOPLIST_FILE = "../FlexLayoutSample/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -678,7 +678,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
GCC_INPUT_FILETYPE = automatic;
INFOPLIST_FILE = "../FlexLayoutSample/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion FlexLayout.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |spec|
spec.name = "FlexLayout"
spec.version = "2.1.0"
spec.version = "2.2.0"
spec.summary = "FlexLayout"
spec.homepage = "https://github.com/lucdion/FlexLayout.git"
spec.license = "MIT license"
Expand Down
4 changes: 2 additions & 2 deletions FlexLayout.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -563,7 +563,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = XCODE_PROJECT_BUILD;
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/facebook/yoga.git",
"state": {
"branch": null,
"revision": "69b8934429702bd3ab06e8d6f709112a761b474b",
"version": "3.1.0"
"revision": "f55265f5182ca433211f536b2f466587899bc443",
"version": "3.2.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import PackageDescription
let package = Package(
name: "FlexLayout",
platforms: [
.iOS(.v12),
.iOS(.v14),
],
products: [
.library(name: "FlexLayout", targets: ["FlexLayout"]),
],
dependencies: [
.package(url: "https://github.com/facebook/yoga.git", from: "3.1.0"),
.package(url: "https://github.com/facebook/yoga.git", from: "3.2.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform :ios, '14.0'
workspace 'FlexLayout.xcworkspace'

target 'FlexLayout' do
pod 'Yoga', git: 'https://github.com/facebook/yoga.git', tag: 'v3.1.0'
pod 'Yoga', git: 'https://github.com/facebook/yoga.git', tag: 'v3.2.0'
end

target 'FlexLayoutTests' do
Expand Down
18 changes: 9 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- FlexLayout (2.0.10):
- FlexLayout (2.2.0):
- Yoga
- PinLayout (1.10.5)
- SwiftLint (0.55.1)
- Yoga (3.1.0)
- Yoga (3.2.0)

DEPENDENCIES:
- FlexLayout (from `./`)
- PinLayout
- SwiftLint
- Yoga (from `https://github.com/facebook/yoga.git`, tag `v3.1.0`)
- Yoga (from `https://github.com/facebook/yoga.git`, tag `v3.2.0`)

SPEC REPOS:
trunk:
Expand All @@ -21,19 +21,19 @@ EXTERNAL SOURCES:
:path: "./"
Yoga:
:git: https://github.com/facebook/yoga.git
:tag: v3.1.0
:tag: v3.2.0

CHECKOUT OPTIONS:
Yoga:
:git: https://github.com/facebook/yoga.git
:tag: v3.1.0
:tag: v3.2.0

SPEC CHECKSUMS:
FlexLayout: aaf305c1f3203be3d8694c3835773d1e7a912b72
FlexLayout: 8780755eda402e29eddd4b45a72018c8811ed78d
PinLayout: f6c2b63a5a5b24864064e1d15c67de41b4e74748
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
Yoga: 955c6d6390d5b00fb54d02151e67d69b3ac6f2d8
Yoga: 05f97d1ab7a72d84edff52f6699fe7bd58332c43

PODFILE CHECKSUM: 616cb577f11ab8498737680dedeed47c6fae4b64
PODFILE CHECKSUM: 83806357f78a79818dc54f3a63b5b2677be70533

COCOAPODS: 1.16.2
COCOAPODS: 1.15.2
28 changes: 20 additions & 8 deletions Sources/Swift/FlexLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,6 @@ public final class Flex {

/**
Set all margins using UIEdgeInsets.
This method is particularly useful to set all margins using iOS 11 `UIView.safeAreaInsets`.
*/
@discardableResult
public func margin(_ insets: UIEdgeInsets) -> Flex {
Expand All @@ -904,11 +903,7 @@ public final class Flex {

/**
Set margins using NSDirectionalEdgeInsets.
This method is particularly to set all margins using iOS 11 `UIView.directionalLayoutMargins`.

Available only on iOS 11 and higher.
*/
@available(tvOS 11.0, iOS 11.0, *)
@discardableResult
public func margin(_ directionalInsets: NSDirectionalEdgeInsets) -> Flex {
yoga.marginTop = YGValue(directionalInsets.top)
Expand Down Expand Up @@ -1138,10 +1133,7 @@ public final class Flex {
/**
Set paddings using NSDirectionalEdgeInsets.
This method is particularly to set all paddings using iOS 11 `UIView.directionalLayoutMargins`.

Available only on iOS 11 and higher.
*/
@available(tvOS 11.0, iOS 11.0, *)
@discardableResult
public func padding(_ directionalInsets: NSDirectionalEdgeInsets) -> Flex {
yoga.paddingTop = YGValue(directionalInsets.top)
Expand Down Expand Up @@ -1335,6 +1327,16 @@ public final class Flex {
return self
}

//
// MARK: BoxSizing
//

@discardableResult
public func boxSizing(_ boxSizing: BoxSizing) -> Self {
yoga.boxSizing = boxSizing.yogaValue
return self
}

// MARK: Enums

/**
Expand Down Expand Up @@ -1472,6 +1474,16 @@ public final class Flex {
case flex
/// With this value, the item will be hidden and not be calculated
case none
/// Yoga nodes may now be set to display: contents to remove them from the layout flow, while preserving and hoisting the node's children. This may be used by the higher level UI framework to allow more easily composing wrapper components (such as those which may need to handle events, without influencing child layout)
case contents
}

/// Allowing sizing values to influence the content box instead of the border box.
public enum BoxSizing {
/// Default value: If you set an element's width to 100 pixels, that 100 pixels will include any border or padding you added, and the content box will shrink to absorb that extra width. This typically makes it much easier to size elements.
case borderBox
/// If you set an element's width to 100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or padding will be added to the final rendered width, making the element wider than 100px.
case contentBox
}

/*public enum Overflow {
Expand Down
Loading
Loading