【YogaKit】Fix two crashes. YogaKitSample upgrade to swift 5 #1144
@@ -430,7 +430,13 @@ static void YGAttachNodesFromViewHierachy(UIView* const view) {
|
|||||||
if (!YGNodeHasExactSameChildren(node, subviewsToInclude)) {
|
if (!YGNodeHasExactSameChildren(node, subviewsToInclude)) {
|
||||||
YGRemoveAllChildren(node);
|
YGRemoveAllChildren(node);
|
||||||
for (int i = 0; i < subviewsToInclude.count; i++) {
|
for (int i = 0; i < subviewsToInclude.count; i++) {
|
||||||
YGNodeInsertChild(node, subviewsToInclude[i].yoga.node, i);
|
// should remove from owner if node has one owner
|
||||||
|
const YGNodeRef child = subviewsToInclude[i].yoga.node;
|
||||||
|
YGNodeRef owner = YGNodeGetOwner(child);
|
||||||
|
if (owner) {
|
||||||
|
YGNodeRemoveChild(owner, child);
|
||||||
|
}
|
||||||
|
YGNodeInsertChild(node, child, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,10 +495,8 @@ static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) {
|
|||||||
},
|
},
|
||||||
.size =
|
.size =
|
||||||
{
|
{
|
||||||
.width = YGRoundPixelValue(bottomRight.x) -
|
.width = MAX(0, YGRoundPixelValue(bottomRight.x) - YGRoundPixelValue(topLeft.x)),
|
||||||
YGRoundPixelValue(topLeft.x),
|
.height = MAX(0, YGRoundPixelValue(bottomRight.y) - YGRoundPixelValue(topLeft.y)),
|
||||||
.height = YGRoundPixelValue(bottomRight.y) -
|
|
||||||
YGRoundPixelValue(topLeft.y),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -4,23 +4,28 @@ PODS:
|
|||||||
- IGListKit/Default (2.1.0):
|
- IGListKit/Default (2.1.0):
|
||||||
- IGListKit/Diffing
|
- IGListKit/Diffing
|
||||||
- IGListKit/Diffing (2.1.0)
|
- IGListKit/Diffing (2.1.0)
|
||||||
- Yoga (1.7.0)
|
- Yoga (1.14.0)
|
||||||
- YogaKit (1.7.0):
|
- YogaKit (1.18.1):
|
||||||
- Yoga (~> 1.7)
|
- Yoga (~> 1.14)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- IGListKit (~> 2.1.0)
|
- IGListKit (~> 2.1.0)
|
||||||
- YogaKit (from `../../YogaKit.podspec`)
|
- YogaKit (from `../../YogaKit.podspec`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- IGListKit
|
||||||
|
- Yoga
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
YogaKit:
|
YogaKit:
|
||||||
:path: ../../YogaKit.podspec
|
:path: "../../YogaKit.podspec"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e
|
IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e
|
||||||
Yoga: 2ed1d7accfef3610a67f58c0cf101a0662137f2c
|
Yoga: cff67a400f6b74dc38eb0bad4f156673d9aa980c
|
||||||
YogaKit: 31576530e8fcae3175469719ec3212397403330b
|
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 216f8e7127767709e0e43f3711208d238fa5c404
|
PODFILE CHECKSUM: 216f8e7127767709e0e43f3711208d238fa5c404
|
||||||
|
|
||||||
COCOAPODS: 1.1.1
|
COCOAPODS: 1.11.2
|
||||||
|
@@ -178,7 +178,6 @@
|
|||||||
13687D401DF8748300E7C260 /* Frameworks */,
|
13687D401DF8748300E7C260 /* Frameworks */,
|
||||||
13687D411DF8748300E7C260 /* Resources */,
|
13687D411DF8748300E7C260 /* Resources */,
|
||||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */,
|
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */,
|
||||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -233,6 +232,7 @@
|
|||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
|
English,
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
@@ -272,28 +272,16 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
);
|
);
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-YogaKitSample-checkManifestLockResult.txt",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "diff \"${PODS_ROOT}/../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";
|
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;
|
|
||||||
};
|
|
||||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = {
|
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = {
|
||||||
@@ -302,13 +290,20 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/IGListKit/IGListKit.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/YogaKit/YogaKit.framework",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"${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;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
@@ -446,7 +441,7 @@
|
|||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -461,7 +456,7 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user