From 1050b63503083676fe1f8694824efdf4405792b4 Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Mon, 21 Aug 2023 16:25:16 +0900 Subject: [PATCH] Update priority method #9 --- Podfile.lock | 2 +- TextureBridging/NodeView.swift | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 7ecfdd4..8dfb6db 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -47,4 +47,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: dec60cd2be7cdaf4cee05f89f703dd009f3be229 -COCOAPODS: 1.10.1 +COCOAPODS: 1.12.1 diff --git a/TextureBridging/NodeView.swift b/TextureBridging/NodeView.swift index 13c3ed4..ccf06d1 100644 --- a/TextureBridging/NodeView.swift +++ b/TextureBridging/NodeView.swift @@ -73,6 +73,16 @@ open class NodeView: UIView { super.invalidateIntrinsicContentSize() } + open override func setContentHuggingPriority(_ priority: UILayoutPriority, for axis: NSLayoutConstraint.Axis) { + super.setContentHuggingPriority(priority, for: axis) + internalView.setContentHuggingPriority(priority, for: axis) + } + + open override func setContentCompressionResistancePriority(_ priority: UILayoutPriority, for axis: NSLayoutConstraint.Axis) { + super.setContentCompressionResistancePriority(priority, for: axis) + internalView.setContentCompressionResistancePriority(priority, for: axis) + } + } private final class _InternalNodeView: UILabel /* To use `textRect` method */ {